From 8da4346686f339241efed3e6bf752cc4f8670103 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Tue, 26 Nov 2019 11:22:35 -0800 Subject: [PATCH] Fix cleanup error on content client test A race occurs today where the cleanup runs after the lease has been deleted, making all the content and statuses eligible for collection during the cleanup. There is a case where a status could be listed but removed before the abort is called. In this case, abort will return a not found and the test cleanup should ignore it. Signed-off-by: Derek McGowan --- content_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content_test.go b/content_test.go index e72bd9d70..6b0d5c590 100644 --- a/content_test.go +++ b/content_test.go @@ -57,7 +57,7 @@ func newContentStore(ctx context.Context, root string) (context.Context, content return err } for _, st := range statuses { - if err := cs.Abort(ctx, st.Ref); err != nil { + if err := cs.Abort(ctx, st.Ref); err != nil && !errdefs.IsNotFound(err) { return errors.Wrapf(err, "failed to abort %s", st.Ref) } }