Explorar el Código

etcdserver: fix TestTriggerSnap

Before checking, it needs to wait for snapshot goroutine to finish its
work.
Yicheng Qin hace 10 años
padre
commit
5d131acfba
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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.Do(context.Background(), pb.Request{Method: "PUT"})
 	}
 	}
 	srv.Stop()
 	srv.Stop()
+	// wait for snapshot goroutine to finish
+	testutil.WaitSchedule()
 
 
 	gaction := p.Action()
 	gaction := p.Action()
 	// each operation is recorded as a Save
 	// each operation is recorded as a Save