diff options
author | dwight <dwight@10gen.com> | 2011-01-19 19:08:49 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-01-19 19:08:49 -0500 |
commit | f4d4d60929cdddcd95befdb4d5eac9e27ddad5ba (patch) | |
tree | 509bc929c0b893d6e1a9edcad9d1a8af77ec90d9 /jstests/dur | |
parent | 7c4988b4c49b3a2798c0d6229a6d70359d7447c4 (diff) | |
download | mongo-f4d4d60929cdddcd95befdb4d5eac9e27ddad5ba.tar.gz |
better error text
Diffstat (limited to 'jstests/dur')
-rwxr-xr-x | jstests/dur/dur1.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/jstests/dur/dur1.js b/jstests/dur/dur1.js index ef0642e897f..2f8fd85f8b1 100755 --- a/jstests/dur/dur1.js +++ b/jstests/dur/dur1.js @@ -52,16 +52,20 @@ function work() { // d.a.reIndex(); // assure writes applied in case we kill -9 on return from this function - d.getLastError(); - - log("endwork"); + d.getLastError();
+
+ log("endwork");
+ return d; } function verify() { - log("verify"); - var d = conn.getDB("test"); - print("count:" + d.foo.count()); - assert(d.foo.count() == 2); + log("verify");
+ var d = conn.getDB("test");
+ var ct = d.foo.count();
+ if (ct != 2) {
+ print("\n\n\nFAIL dur1.js count is wrong in verify(): " + ct + "\n\n\n");
+ assert(ct == 2);
+ } } if( debugging ) { |