Browse Source

integration: fix rwmutex test to check write locking

Anthony Romano 9 years ago
parent
commit
9b91e96510
1 changed files with 1 additions and 1 deletions
  1. 1 1
      integration/v3_lock_test.go

+ 1 - 1
integration/v3_lock_test.go

@@ -133,7 +133,7 @@ func testRWMutex(t *testing.T, waiters int, chooseClient func() *clientv3.Client
 				t.Error(err)
 				t.Error(err)
 			}
 			}
 			rwm := recipe.NewRWMutex(session, "test-rwmutex")
 			rwm := recipe.NewRWMutex(session, "test-rwmutex")
-			if rand.Intn(1) == 0 {
+			if rand.Intn(2) == 0 {
 				if err := rwm.RLock(); err != nil {
 				if err := rwm.RLock(); err != nil {
 					t.Fatalf("could not rlock (%v)", err)
 					t.Fatalf("could not rlock (%v)", err)
 				}
 				}