Browse files

Fix test: retry query after sockets are closed SERVER-6486

  • Loading branch information...
1 parent 44c371c commit b0b4fd2243c92ef73cf03b01866383c7d32f3504 @kchodorow kchodorow committed Jul 17, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 jstests/replsets/reconfig.js
View
12 jstests/replsets/reconfig.js
@@ -36,8 +36,16 @@ catch(e) {
print(e);
}
-var config = master.getDB("local").system.replset.findOne();
-assert.eq(oldVersion+1, config.version);
+assert.soon(function() {
+ try {
+ var config = master.getDB("local").system.replset.findOne();
+ return oldVersion+1 == config.version;
+ }
+ catch (e) {
+ print("Query failed: "+e);
+ return false;
+ }
+});
print("0 & 3 up; 1, 2, 4 down");

0 comments on commit b0b4fd2

Please sign in to comment.