Skip to content

Commit ae3ca7b

Browse files
committed
Run TestImportExtremelyLargeImageWorks in parallel
This is a slow test, taking over two minutes to complete, so spin up a new daemon for this test and run it in parallel Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 2b7e084 commit ae3ca7b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

integration/image/import_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,24 @@ import (
99
"testing"
1010

1111
"github.com/docker/docker/api/types"
12+
"github.com/docker/docker/internal/test/daemon"
1213
"github.com/docker/docker/internal/testutil"
1314
"gotest.tools/skip"
1415
)
1516

1617
// Ensure we don't regress on CVE-2017-14992.
1718
func TestImportExtremelyLargeImageWorks(t *testing.T) {
19+
skip.If(t, testEnv.IsRemoteDaemon, "cannot run daemon when remote daemon")
1820
skip.If(t, runtime.GOARCH == "arm64", "effective test will be time out")
1921
skip.If(t, testEnv.OSType == "windows", "TODO enable on windows")
22+
t.Parallel()
2023

21-
defer setupTest(t)()
22-
client := testEnv.APIClient()
24+
// Spin up a new daemon, so that we can run this test in parallel (it's a slow test)
25+
d := daemon.New(t)
26+
d.Start(t)
27+
defer d.Stop(t)
28+
29+
client := d.NewClientT(t)
2330

2431
// Construct an empty tar archive with about 8GB of junk padding at the
2532
// end. This should not cause any crashes (the padding should be mostly

0 commit comments

Comments
 (0)