Skip to content

Commit 5348c67

Browse files
committed
Fix[entropy]: Fix race condition during testing conditions
1 parent a063fa9 commit 5348c67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

entropy/entropy_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ func Test_RNGUint32(t *testing.T) {
160160
t.Parallel()
161161
// start globals fresh, just for coverage.
162162
setSharedRand()
163+
hardLocc.Lock()
163164
getSharedRand = &sync.Once{}
165+
hardLocc.Unlock()
164166
RNGUint32()
165167
}
166168

0 commit comments

Comments
 (0)