Browse Source

raft: fix TestNodeStepUnblock

The test cases have side-effect. We need to stop testing if one of the test
fails. Also timeout should be much longer to avoid false-positive.
Xiang Li 9 years ago
parent
commit
500296d0fb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      raft/node_test.go

+ 2 - 2
raft/node_test.go

@@ -99,8 +99,8 @@ func TestNodeStepUnblock(t *testing.T) {
 				n.done = make(chan struct{})
 			default:
 			}
-		case <-time.After(time.Millisecond * 100):
-			t.Errorf("#%d: failed to unblock step", i)
+		case <-time.After(1 * time.Second):
+			t.Fatalf("#%d: failed to unblock step", i)
 		}
 	}
 }