Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 1673199

Browse files
authored
Merge pull request #419 from andrewhsu/xit
[19.03] Windows: disable flaky test TestStartReturnCorrectExitCode Upstream-commit: 35913e58c2089c2d19eb02b611fc289d1c56f113 Component: engine
2 parents 1e9446f + 1aa32f5 commit 1673199

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

components/engine/integration-cli/docker_cli_start_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ package main
22

33
import (
44
"fmt"
5+
"runtime"
6+
"strconv"
57
"strings"
68
"testing"
79
"time"
810

911
"github.com/docker/docker/integration-cli/cli"
12+
"github.com/docker/docker/pkg/parsers/kernel"
1013
"gotest.tools/assert"
1114
"gotest.tools/icmd"
1215
)
@@ -186,6 +189,18 @@ func (s *DockerSuite) TestStartAttachWithRename(c *testing.T) {
186189
}
187190

188191
func (s *DockerSuite) TestStartReturnCorrectExitCode(c *testing.T) {
192+
// Note we parse kernel.GetKernelVersion rather than system.GetOSVersion
193+
// as test binaries aren't manifested, so would otherwise report the wrong
194+
// build number.
195+
if runtime.GOOS == "windows" {
196+
v, err := kernel.GetKernelVersion()
197+
assert.NilError(c, err)
198+
build, _ := strconv.Atoi(strings.Split(strings.SplitN(v.String(), " ", 3)[2][1:], ".")[0])
199+
if build < 16299 {
200+
c.Skip("FLAKY on Windows RS1, see #38521")
201+
}
202+
}
203+
189204
dockerCmd(c, "create", "--restart=on-failure:2", "--name", "withRestart", "busybox", "sh", "-c", "exit 11")
190205
dockerCmd(c, "create", "--rm", "--name", "withRm", "busybox", "sh", "-c", "exit 12")
191206

0 commit comments

Comments
 (0)