diff options
author | Yunhe (John) Wang <yunhe.wang@mongodb.com> | 2015-09-14 15:30:18 -0400 |
---|---|---|
committer | Yunhe (John) Wang <yunhe.wang@mongodb.com> | 2015-09-16 11:31:55 -0400 |
commit | fa12f702ead7919669e21ff9f532c49a8fec27ef (patch) | |
tree | c6d47140763f4514f45a227d144529c44b628542 /jstests | |
parent | 33e1ddbb9f69d2a2551246caf38448181e1c6b1f (diff) | |
download | mongo-fa12f702ead7919669e21ff9f532c49a8fec27ef.tar.gz |
SERVER-11735 Changed dbcase tests to detect write error instead of explicit error code
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/core/dbcase.js | 1 | ||||
-rw-r--r-- | jstests/core/dbcase2.js | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/jstests/core/dbcase.js b/jstests/core/dbcase.js index c3aa466ba17..078abf07288 100644 --- a/jstests/core/dbcase.js +++ b/jstests/core/dbcase.js @@ -10,7 +10,6 @@ assert.writeOK( a.foo.save( { x : 1 } )); res = b.foo.save( { x : 1 } ); assert.writeError( res ); -assert.eq( 13297, res.getWriteError().code, res.toString() ); assert.neq( -1, db.getMongo().getDBNames().indexOf( a.getName() ) ); assert.eq( -1, db.getMongo().getDBNames().indexOf( b.getName() ) ); diff --git a/jstests/core/dbcase2.js b/jstests/core/dbcase2.js index 937527e752e..553db73147b 100644 --- a/jstests/core/dbcase2.js +++ b/jstests/core/dbcase2.js @@ -8,6 +8,6 @@ assert.eq(1, resultLower.nInserted); var resultUpper = dbUpperCase.c.insert({}); assert.eq(0, resultUpper.nInserted); -assert.eq(13297, resultUpper.getWriteError().code); +assert.writeError(resultUpper); assert.eq( -1, db.getMongo().getDBNames().indexOf( "dbcase2test_dbnameA" ) ); |