Browse code

Limit TestEventsLimit to 4 concurrent containers on Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>

Darren Stahl authored on 2016/11/30 10:53:39
Showing 1 changed files
... ...
@@ -80,10 +80,15 @@ func (s *DockerSuite) TestEventsUntag(c *check.C) {
80 80
 }
81 81
 
82 82
 func (s *DockerSuite) TestEventsLimit(c *check.C) {
83
-	// Limit to 8 goroutines creating containers in order to prevent timeouts
84
-	// creating so many containers simultaneously on Windows
85
-	sem := make(chan bool, 8)
83
+	// Windows: Limit to 4 goroutines creating containers in order to prevent
84
+	// timeouts creating so many containers simultaneously. This is a due to
85
+	// a bug in the Windows platform. It will be fixed in a Windows Update.
86 86
 	numContainers := 17
87
+	numConcurrentContainers := numContainers
88
+	if testEnv.DaemonPlatform() == "windows" {
89
+		numConcurrentContainers = 4
90
+	}
91
+	sem := make(chan bool, numConcurrentContainers)
87 92
 	errChan := make(chan error, numContainers)
88 93
 
89 94
 	args := []string{"run", "--rm", "busybox", "true"}