[go: up one dir, main page]

Skip to content

Fix TestVFSFindOrCreateArchiveCacheEvict flaky test

I found this flaky test locally, I believe this line https://gitlab.com/gitlab-org/gitlab-pages/-/blob/6cba2f2875856a7b4e2d008ca348d7b91098ed35/internal/vfs/zip/vfs_test.go#L120 is causing trouble

 go test ./internal/vfs/zip -run TestVFSFindOrCreateArchiveCacheEvict -count 10 -failfast
--- FAIL: TestVFSFindOrCreateArchiveCacheEvict (0.00s)
    vfs_test.go:126:
        	Error Trace:	vfs_test.go:126
        	Error:      	Should not be: &zip.zipArchive{fs:(*zip.zipVFS)(0xc0000b1e90), path:"http://127.0.0.1:60311/public.zip", once:sync.Once{done:0x1, m:sync.Mutex{state:0, sema:0x0}}, done:(chan struct {})(0xc0000b26c0), openTimeout:30000000000, cacheNamespace:"1:", resource:(*httprange.Resource)(0xc00007fe00), reader:(*httprange.RangedReader)(0xc00007ba50), archive:(*zip.Reader)(0xc00007fe80), err:error(nil), files:map[string]*zip.File{"public/":(*zip.File)(0xc000240160), "public/404.html":(*zip.File)(0xc000240370), "public/bad_symlink.html":(*zip.File)(0xc000240790), "public/index.html":(*zip.File)(0xc0002402c0), "public/subdir/":(*zip.File)(0xc000240420), "public/subdir/2bp3Qzs9CCW7cGnxhghdavZ2bJDTzvu2mrj6O8Yqjm3YMRozRZULxBBKzJXCK16GlsvO1GlbCyONf2LTCndJU9cIr5T3PLDN7XnfG00lEmf9DWHPXiAbbi0v8ioSjnoTqdyjELVKuhsGRGxeV9RptLMyGnbpJx1w2uECiUQSHrRVQNuq2xoHLlk30UAmis1EhGXP5kKprzHxuavsKMdT4XRP0d79tie4tjqtfRsP4y60hmNS1vSujrxzhDa":(*zip.File)(0xc0002406e0), "public/subdir/hello.html":(*zip.File)(0xc0002404d0), "public/subdir/linked.html":(*zip.File)(0xc000240580), "public/symlink.html":(*zip.File)(0xc000240630)}}
        	Test:       	TestVFSFindOrCreateArchiveCacheEvict
        	Messages:   	a different archive is returned
FAIL
FAIL	gitlab.com/gitlab-org/gitlab-pages/internal/vfs/zip	0.132s
FAIL