瀏覽代碼

etcdserver: fix TestTriggerSnap

Before checking, it needs to wait for snapshot goroutine to finish its
work.
Yicheng Qin 11 年之前
父節點
當前提交
5d131acfba
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      etcdserver/server_test.go

+ 2 - 0
etcdserver/server_test.go

@@ -748,6 +748,8 @@ func TestTriggerSnap(t *testing.T) {
 		srv.Do(context.Background(), pb.Request{Method: "PUT"})
 	}
 	srv.Stop()
+	// wait for snapshot goroutine to finish
+	testutil.WaitSchedule()
 
 	gaction := p.Action()
 	// each operation is recorded as a Save