Browse Source

Integrated @creack's feedback on TestRestore

shin- 12 năm trước cách đây
mục cha
commit
7b74b9cab5
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      runtime_test.go

+ 1 - 2
runtime_test.go

@@ -305,8 +305,7 @@ func TestRestore(t *testing.T) {
 	// Simulate a crash/manual quit of dockerd: process dies, states stays 'Running'
 	cStdin, _ := container2.StdinPipe()
 	cStdin.Close()
-	container2.State.setStopped(-1)
-	time.Sleep(time.Second)
+	container2.WaitTimeout(time.Second)
 	container2.State.Running = true
 	container2.ToDisk()