summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorAdam Midvidy <amidvidy@gmail.com>2015-06-01 11:19:53 -0400
committerAdam Midvidy <amidvidy@gmail.com>2015-06-03 11:13:31 -0400
commitb9ed79089841c5c05086a490c1323514f342bb42 (patch)
treeedaf31999ac6c6266254e9a41e54674c4d9120a4 /src/mongo/unittest
parentf9685f7f8ed8240e763da406e3e97d94e7a919e6 (diff)
downloadmongo-b9ed79089841c5c05086a490c1323514f342bb42.tar.gz
SERVER-18236 hang slaveOk/secondaryOk and readPreference off OpCtx
- secondaryOk is upconverted/downconverted from QueryOption_SlaveOk - readPreference is upconverted/downconverted from $query wrapped commands or $queryOptions - both are now accessed via OperationContext instead of being read from a mutable command object - removed logic for parsing secondaryOk and readPreference from the command execution pipeline in dbcommands.cpp
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/unittest.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/unittest/unittest.h b/src/mongo/unittest/unittest.h
index e22f76c5f1d..7faa5dcb3bd 100644
--- a/src/mongo/unittest/unittest.h
+++ b/src/mongo/unittest/unittest.h
@@ -37,6 +37,7 @@
#include <cmath>
#include <sstream>
#include <string>
+#include <utility>
#include <vector>
#include <boost/config.hpp>
@@ -511,6 +512,12 @@ DECLARE_COMPARISON_ASSERTION(GTE, >=);
return swt.getValue();
}
+ template <typename T>
+ T assertGet(StatusWith<T>&& swt) {
+ ASSERT_OK(swt.getStatus());
+ return std::move(swt.getValue());
+ }
+
/**
* Hack to support the runaway test observer in dbtests. This is a hook that
* unit test running harnesses (unittest_main and dbtests) must implement.