summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_client_cursor_mock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/query/cluster_client_cursor_mock.cpp')
-rw-r--r--src/mongo/s/query/cluster_client_cursor_mock.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/query/cluster_client_cursor_mock.cpp b/src/mongo/s/query/cluster_client_cursor_mock.cpp
index 2b10928449e..bd4136ab7f2 100644
--- a/src/mongo/s/query/cluster_client_cursor_mock.cpp
+++ b/src/mongo/s/query/cluster_client_cursor_mock.cpp
@@ -43,12 +43,12 @@ ClusterClientCursorMock::~ClusterClientCursorMock() {
invariant(_exhausted || _killed);
}
-StatusWith<boost::optional<BSONObj>> ClusterClientCursorMock::next() {
+StatusWith<ClusterQueryResult> ClusterClientCursorMock::next() {
invariant(!_killed);
if (_resultsQueue.empty()) {
_exhausted = true;
- return {boost::none};
+ return {ClusterQueryResult()};
}
auto out = _resultsQueue.front();
@@ -59,7 +59,7 @@ StatusWith<boost::optional<BSONObj>> ClusterClientCursorMock::next() {
}
++_numReturnedSoFar;
- return boost::optional<BSONObj>(out.getValue());
+ return out.getValue();
}
long long ClusterClientCursorMock::getNumReturnedSoFar() const {
@@ -77,8 +77,8 @@ bool ClusterClientCursorMock::isTailable() const {
return false;
}
-void ClusterClientCursorMock::queueResult(const BSONObj& obj) {
- _resultsQueue.push({obj});
+void ClusterClientCursorMock::queueResult(const ClusterQueryResult& result) {
+ _resultsQueue.push({result});
}
bool ClusterClientCursorMock::remotesExhausted() {