Fix[entropy]: Fix race condition during testing conditions

This commit is contained in:
kayos@tcp.direct 2023-09-06 23:42:02 -07:00
parent a063fa9a27
commit 5348c67e04
Signed by: kayos
GPG Key ID: 4B841471B4BEE979

View File

@ -160,7 +160,9 @@ func Test_RNGUint32(t *testing.T) {
t.Parallel()
// start globals fresh, just for coverage.
setSharedRand()
hardLocc.Lock()
getSharedRand = &sync.Once{}
hardLocc.Unlock()
RNGUint32()
}