Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

try to make fsync2 test less flake repliaction

  • Loading branch information...
commit edbdfe32ce35e47b2fd11f7ca413353017f138c1 1 parent 60feb24
@erh erh authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 jstests/fsync2.js
View
11 jstests/fsync2.js
@@ -3,6 +3,14 @@ function debug( msg ) {
print( "fsync2: " + msg );
}
+var loops = 200;
+if ( db.getSisterDB("local").slaves.count() > 0 ) {
+ // replication can cause some write locks on local
+ // therefore this test is flaky with replication on
+ loops = 1;
+}
+
+
function doTest() {
db.fsync2.drop();
@@ -14,7 +22,8 @@ function doTest() {
debug( "after lock" );
- for ( i=0; i<200; i++) {
+
+ for ( var i=0; i<loops; i++) {
debug( "loop: " + i );
assert.eq(1, db.fsync2.count());
sleep(100);
Please sign in to comment.
Something went wrong with that request. Please try again.