diff options
author | Geert Bosch <geert@mongodb.com> | 2015-10-26 18:36:37 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2015-10-30 23:39:50 -0400 |
commit | e2443741a5646030a0f530169c4a73ef14698f0f (patch) | |
tree | 9b2800fc90121331dae3d61469e5129a1ff1793f /src/mongo/dbtests/jstests.cpp | |
parent | c63c7ccf20e00faf13661c2515034eb8a82b751b (diff) | |
download | mongo-e2443741a5646030a0f530169c4a73ef14698f0f.tar.gz |
SERVER-15508: Have the shell accept all unsigned Timestamp values
Also rejects negative Timestamp time and increment arguments and canonicalizes types.
Diffstat (limited to 'src/mongo/dbtests/jstests.cpp')
-rw-r--r-- | src/mongo/dbtests/jstests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/dbtests/jstests.cpp b/src/mongo/dbtests/jstests.cpp index aac958bda4f..fc043e01323 100644 --- a/src/mongo/dbtests/jstests.cpp +++ b/src/mongo/dbtests/jstests.cpp @@ -850,12 +850,12 @@ public: } }; -class InvalidTimestamp { +class MaxTimestamp { public: void run() { unique_ptr<Scope> s(globalScriptEngine->newScope()); - // Timestamp 't' component cannot exceed max for int32_t. + // Timestamp 't' component can exceed max for int32_t. BSONObj in; { BSONObjBuilder b; @@ -867,7 +867,7 @@ public: } s->setObject("a", in); - ASSERT_FALSE(s->exec("x = tojson( a ); ", "foo", false, true, false)); + ASSERT(s->exec("x = tojson( a ); ", "foo", false, true, false)); } }; @@ -2386,7 +2386,7 @@ public: add<NumberDecimalBigObject>(); } - add<InvalidTimestamp>(); + add<MaxTimestamp>(); add<RenameTest>(); add<WeirdObjects>(); |