From 4625234bba33b57c3c62b42575b080a41983bd6a Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Wed, 9 Aug 2023 10:52:22 -0700 Subject: [PATCH] test: delay slightly between filestore test permutations This is to try to prevent test failing due to trying to access the tempdir while it is being tore down. (go issue: https://github.com/golang/go/issues/43547) ``` === RUN TestFileStoreMsgBlkFailOnKernelFaultLostDataReporting/AES-GCM-S2 filestore_test.go:5195: ------------> 128 testing.go:1225: TempDir RemoveAll cleanup: unlinkat ./TestFileStoreMsgBlkFailOnKernelFaultLostDataReportingAES-GCM-S23605508670/001/msgs: directory not empty --- FAIL: TestFileStoreMsgBlkFailOnKernelFaultLostDataReporting (0.02s) ``` Signed-off-by: Waldemar Quevedo --- server/filestore_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/filestore_test.go b/server/filestore_test.go index bedc60ce..bb715562 100644 --- a/server/filestore_test.go +++ b/server/filestore_test.go @@ -50,6 +50,7 @@ func testFileStoreAllPermutations(t *testing.T, fn func(t *testing.T, fcfg FileS t.Run(subtestName, func(t *testing.T) { fcfg.StoreDir = t.TempDir() fn(t, fcfg) + time.Sleep(100 * time.Millisecond) }) } }