Sfoglia il codice sorgente

Limit TestEventsLimit to 4 concurrent containers on Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Darren Stahl 8 anni fa
parent
commit
2ec808ec08
1 ha cambiato i file con 8 aggiunte e 3 eliminazioni
  1. 8 3
      integration-cli/docker_cli_events_test.go

+ 8 - 3
integration-cli/docker_cli_events_test.go

@@ -80,10 +80,15 @@ func (s *DockerSuite) TestEventsUntag(c *check.C) {
 }
 }
 
 
 func (s *DockerSuite) TestEventsLimit(c *check.C) {
 func (s *DockerSuite) TestEventsLimit(c *check.C) {
-	// Limit to 8 goroutines creating containers in order to prevent timeouts
-	// creating so many containers simultaneously on Windows
-	sem := make(chan bool, 8)
+	// Windows: Limit to 4 goroutines creating containers in order to prevent
+	// timeouts creating so many containers simultaneously. This is a due to
+	// a bug in the Windows platform. It will be fixed in a Windows Update.
 	numContainers := 17
 	numContainers := 17
+	numConcurrentContainers := numContainers
+	if testEnv.DaemonPlatform() == "windows" {
+		numConcurrentContainers = 4
+	}
+	sem := make(chan bool, numConcurrentContainers)
 	errChan := make(chan error, numContainers)
 	errChan := make(chan error, numContainers)
 
 
 	args := []string{"run", "--rm", "busybox", "true"}
 	args := []string{"run", "--rm", "busybox", "true"}