diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2b38cca3..b8abb25c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,6 +296,7 @@ jobs: - name: Integration 2 env: TESTFLAGS_PARALLEL: 1 + EXTRA_TESTFLAGS: "-short" CGO_ENABLED: 1 GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-parallel-junit.xml run: mingw32-make.exe integration diff --git a/integration/client/client_ttrpc_test.go b/integration/client/client_ttrpc_test.go index 1c7aeb9da..774b6cf1d 100644 --- a/integration/client/client_ttrpc_test.go +++ b/integration/client/client_ttrpc_test.go @@ -30,6 +30,9 @@ import ( ) func TestClientTTRPC_New(t *testing.T) { + if testing.Short() { + t.Skip() + } client, err := ttrpcutil.NewClient(address + ".ttrpc") assert.NilError(t, err) @@ -38,6 +41,9 @@ func TestClientTTRPC_New(t *testing.T) { } func TestClientTTRPC_Reconnect(t *testing.T) { + if testing.Short() { + t.Skip() + } client, err := ttrpcutil.NewClient(address + ".ttrpc") assert.NilError(t, err) @@ -63,6 +69,9 @@ func TestClientTTRPC_Reconnect(t *testing.T) { } func TestClientTTRPC_Close(t *testing.T) { + if testing.Short() { + t.Skip() + } client, err := ttrpcutil.NewClient(address + ".ttrpc") assert.NilError(t, err) diff --git a/integration/client/import_test.go b/integration/client/import_test.go index c8a225a0b..661024b6d 100644 --- a/integration/client/import_test.go +++ b/integration/client/import_test.go @@ -140,7 +140,7 @@ func TestImport(t *testing.T) { ctx, cancel := testContext(t) defer cancel() - client, err := New(address) + client, err := newClient(t, address) if err != nil { t.Fatal(err) } diff --git a/integration/client/restart_monitor_test.go b/integration/client/restart_monitor_test.go index fa400cb2c..ef608c454 100644 --- a/integration/client/restart_monitor_test.go +++ b/integration/client/restart_monitor_test.go @@ -32,6 +32,7 @@ import ( "github.com/containerd/containerd/oci" "github.com/containerd/containerd/pkg/testutil" srvconfig "github.com/containerd/containerd/services/server/config" + "github.com/containerd/containerd/sys" exec "golang.org/x/sys/execabs" ) @@ -97,21 +98,25 @@ func newDaemonWithConfig(t *testing.T, configTOML string) (*Client, *daemon, fun cleanup := func() { if err := client.Close(); err != nil { - t.Fatalf("failed to close client: %v", err) + t.Errorf("failed to close client: %v", err) } if err := ctrd.Stop(); err != nil { if err := ctrd.Kill(); err != nil { - t.Fatalf("failed to signal containerd: %v", err) + t.Errorf("failed to signal containerd: %v", err) } } if err := ctrd.Wait(); err != nil { if _, ok := err.(*exec.ExitError); !ok { - t.Fatalf("failed to wait for: %v", err) + t.Errorf("failed to wait for: %v", err) } } - if err := os.RemoveAll(tempDir); err != nil { - t.Fatalf("failed to remove %s: %v", tempDir, err) + if err := sys.ForceRemoveAll(tempDir); err != nil { + t.Errorf("failed to remove %s: %v", tempDir, err) } + if t.Failed() { + t.Log("Daemon output:\n", buf.String()) + } + // cleaning config-specific resources is up to the caller } return client, &ctrd, cleanup