Skip to content

Commit 0b2d89c

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 0b58491 commit 0b2d89c

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
@@ -111,10 +111,11 @@ func TestMain(m *testing.M) {
111111
}).Info("running tests against containerd")
112112

113113
// pull a seed image
114+
log.G(ctx).Info("start to pull seed image")
114115
if _, err = client.Pull(ctx, testImage, WithPullUnpack); err != nil {
115-
ctrd.Stop()
116-
ctrd.Wait()
117116
fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String())
117+
ctrd.Kill()
118+
ctrd.Wait()
118119
os.Exit(1)
119120
}
120121

0 commit comments

Comments
 (0)