Flaky test in registry/storage/driver/inmemory

panic: test timed out after 30m0s

goroutine 379 [running]:
testing.(*M).startAlarm.func1()
	/usr/local/go/src/testing/testing.go:2036 +0x8e
created by time.goFunc
	/usr/local/go/src/time/sleep.go:176 +0x32

goroutine 1 [chan receive, 30 minutes]:
testing.(*T).Run(0xc0001b7a00, {0xc2fad5?, 0x51cfe5?}, 0xc82338)
	/usr/local/go/src/testing/testing.go:1494 +0x37a
testing.runTests.func1(0xc0003b8a20?)
	/usr/local/go/src/testing/testing.go:1846 +0x6e
testing.tRunner(0xc0001b7a00, 0xc0002dfca0)
	/usr/local/go/src/testing/testing.go:1446 +0x10b
testing.runTests(0xc00037fb80?, {0x11d6e60, 0x2, 0x2}, {0x7fe861910108?, 0x40?, 0x11f4800?})
	/usr/local/go/src/testing/testing.go:1844 +0x456
testing.(*M).Run(0xc00037fb80)
	/usr/local/go/src/testing/testing.go:1726 +0x5d9
main.main()
	_testmain.go:99 +0x255

goroutine 35 [chan receive, 28 minutes]:
gopkg.in/check%2ev1.(*suiteRunner).runTest(...)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:813
gopkg.in/check%2ev1.(*suiteRunner).run(0xc0003a2b80)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:618 +0x1bd
gopkg.in/check%2ev1.Run({0xc2ec40?, 0xc000287dc0?}, 0x0?)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/run.go:92 +0x2a
gopkg.in/check%2ev1.RunAll(0x24?)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/run.go:84 +0x85
gopkg.in/check%2ev1.TestingT(0xc0001b7ba0)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/run.go:72 +0x292
github.com/docker/distribution/registry/storage/driver/inmemory.Test(0x408519?)
	/builds/gitlab-org/container-registry/registry/storage/driver/inmemory/driver_test.go:15 +0x19
testing.tRunner(0xc0001b7ba0, 0xc82338)
	/usr/local/go/src/testing/testing.go:1446 +0x10b
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1493 +0x35f

goroutine 36 [select, 28 minutes]:
gopkg.in/check%2ev1.(*resultTracker)._loopRoutine(0xc0001dc1b0)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:464 +0x8d
created by gopkg.in/check%2ev1.(*resultTracker).start
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:444 +0x56

goroutine 400 [runnable]:
github.com/docker/distribution/registry/storage/driver/inmemory.(*file).WriteAt(0xc06bd6f500, {0xc06bdf4000, 0x8000, 0xc0003e75c0?}, 0x324a8000)
	/builds/gitlab-org/container-registry/registry/storage/driver/inmemory/mfs.go:301 +0x6c
github.com/docker/distribution/registry/storage/driver/inmemory.(*writer).Write(0xc06bdb2f00, {0xc06bdf4000, 0x8000, 0x8000})
	/builds/gitlab-org/container-registry/registry/storage/driver/inmemory/driver.go:363 +0x150
io.copyBuffer({0x7fe83822ca18, 0xc06bdb2f00}, {0xd43c00, 0xc06bd33bc0}, {0x0, 0x0, 0x0})
	/usr/local/go/src/io/io.go:429 +0x204
io.Copy(...)
	/usr/local/go/src/io/io.go:386
github.com/docker/distribution/registry/storage/driver/testsuites.(*DriverSuite).TestWriteReadLargeStreams(0xc000287dc0, 0xc0000d6f00)
	/builds/gitlab-org/container-registry/registry/storage/driver/testsuites/testsuites.go:334 +0x2a5
reflect.Value.call({0xc2ec40?, 0xc000287dc0?, 0x15213?}, {0xc2f9f5, 0x4}, {0xc000087f08, 0x1, 0x1?})
	/usr/local/go/src/reflect/value.go:584 +0x8c5
reflect.Value.Call({0xc2ec40?, 0xc000287dc0?, 0xc06bdb6300?}, {0xc000071f08?, 0xb213?, 0xc000071e96?})
	/usr/local/go/src/reflect/value.go:368 +0xbc
gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1(0xc0000d6f00)
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:775 +0x632
gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:669 +0xa2
created by gopkg.in/check%2ev1.(*suiteRunner).forkCall
	/go/pkg/mod/gopkg.in/check.v1@v1.0.0-20201130134442-10cb98267c6c/check.go:666 +0x285
FAIL registry/storage/driver/inmemory.Test (-1.00s)

=== Failed
=== FAIL: registry/storage/driver/inmemory Test (unknown)

https://gitlab.com/gitlab-org/container-registry/-/jobs/3296137856