graph-gophers / dataloader

Implementation of Facebook's DataLoader in Golang
MIT License
1.21k stars 75 forks source link

TestLoader/allows_clearAll_values_in_cache fails non-deterministically #76

Open tonyghita opened 3 years ago

tonyghita commented 3 years ago

@mjq discovered an issue with a unit test while fixing an incorrect CI configuration in #73:

I can reproduce this failure, but only rarely - on my laptop, the test failed only 3 out of 10000 runs.

$ go test -v -race -coverprofile=coverage.txt -covermode=atomic -count 10000 | grep FAIL
--- FAIL: TestLoader (0.00s)
    --- FAIL: TestLoader/allows_clearAll_values_in_cache (0.02s)
--- FAIL: TestLoader (0.00s)
    --- FAIL: TestLoader/allows_clearAll_values_in_cache (0.02s)
--- FAIL: TestLoader (0.00s)
    --- FAIL: TestLoader/allows_clearAll_values_in_cache (0.02s)
FAIL
FAIL    github.com/graph-gophers/dataloader/v6  390.973s

We should dig into what causes this test to fail non-deterministically and then fix the issue.