diff options
author | dwight <dwight@10gen.com> | 2011-03-02 22:13:05 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2011-03-02 22:13:05 -0500 |
commit | 63e3912a53af71397f4373e7febb36824477cbee (patch) | |
tree | 6fce3102d757c160470396200892d2030bc82df7 /jstests/dur | |
parent | 79c994ddd814e7ebed53c3b600e2b268cf36fbec (diff) | |
download | mongo-63e3912a53af71397f4373e7febb36824477cbee.tar.gz |
more logging for test
Diffstat (limited to 'jstests/dur')
-rw-r--r-- | jstests/dur/dropdb.js | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/jstests/dur/dropdb.js b/jstests/dur/dropdb.js index 7f82cd74ddc..2aabd4a59f2 100644 --- a/jstests/dur/dropdb.js +++ b/jstests/dur/dropdb.js @@ -73,21 +73,28 @@ function verify() { var d = conn.getDB("test"); var count = d.foo.count(); if (count != 1) { - print("going to fail, count mismatch in verify()"); + print("going to fail, test.foo.count() != 1 in verify()"); sleep(10000); // easier to read the output this way print("\n\n\ndropdb.js FAIL test.foo.count() should be 1 but is : " + count); - print(d.foo.count() + "\n\n\n"); + print(d.foo.count() + "\n\n\n"); assert(false); } assert(d.foo.findOne()._id == 100, "100"); print("dropdb.js teste.foo.findOne:"); - printjson(conn.getDB("teste").foo.findOne()); - - var teste = conn.getDB("teste"); - print("dropdb count " + teste.foo.count()); + printjson(conn.getDB("teste").foo.findOne());
+
+ var teste = conn.getDB("teste");
+ var testecount = teste.foo.count();
+ if (testecount != 1) {
+ print("going to fail, teste.foo.count() != 1 in verify()");
+ sleep(10000); // easier to read the output this way
+ print("\n\n\ndropdb.js FAIL teste.foo.count() should be 1 but is : " + testecount);
+ print("\n\n\n");
+ assert(false);
+ } + print("teste.foo.count() = " + teste.foo.count()); assert(teste.foo.findOne()._id == 99, "teste"); - } if (debugging) { |