Skip to content

Commit a4942ca

Browse files
fuweidestesp
authored andcommitted
Fix error on pull hang in CI
Kill the underlying containerd after outputting error. Otherwise CI hangs indefinitely and requires the CI infrastructure to kill the build at the timeout expiration. Signed-off-by: Wei Fu <[email protected]> Signed-off-by: Phil Estes <[email protected]>
1 parent 6bcf463 commit a4942ca

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

client_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,11 @@ func TestMain(m *testing.M) {
129129
}).Info("running tests against containerd")
130130

131131
// pull a seed image
132+
log.G(ctx).Info("start to pull seed image")
132133
if _, err = client.Pull(ctx, testImage, WithPullUnpack); err != nil {
133-
ctrd.Stop()
134-
ctrd.Wait()
135134
fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String())
135+
ctrd.Kill()
136+
ctrd.Wait()
136137
os.Exit(1)
137138
}
138139

0 commit comments

Comments
 (0)