Procházet zdrojové kódy

Avoid unwanted warnings from destroy() in TestStart()

Guillaume J. Charmes před 12 roky
rodič
revize
cda9cf1539
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      container_test.go

+ 2 - 0
container_test.go

@@ -267,6 +267,8 @@ func TestStart(t *testing.T) {
 	// Try to avoid the timeoout in destroy. Best effort, don't check error
 	// Try to avoid the timeoout in destroy. Best effort, don't check error
 	cStdin, _ := container.StdinPipe()
 	cStdin, _ := container.StdinPipe()
 	cStdin.Close()
 	cStdin.Close()
+	container.WaitTimeout(500 * time.Millisecond)
+	container.State.setStopped(0)
 }
 }
 
 
 func TestRun(t *testing.T) {
 func TestRun(t *testing.T) {