Просмотр исходного кода

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 лет назад
Родитель
Сommit
500296d0fb
1 измененных файлов с 2 добавлено и 2 удалено
  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)
 		}
 	}
 }