t.Log is safe for concurrent use, but it's not safe to call t.Log as the test is ending, which I think is causing the race detector to go off. You should make sure that any background goroutines are stopped before the test ends.
This should fix the occasional race condition warning.
https://github.com/uber-go/zap/issues/687#issuecomment-473382859
This should fix the occasional race condition warning.