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 <wally@nats.io>
This commit is contained in:
Waldemar Quevedo
2023-08-09 10:52:22 -07:00
parent f13dd59311
commit 4625234bba

View File

@@ -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)
})
}
}