fix synchronization issues, use AtomicFlag/atomic.Value for shared fields
This commit is contained in:
@@ -38,9 +38,8 @@ func TestIsReady(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.state.String(), func(t *testing.T) {
|
||||
p := &ParticipantImpl{
|
||||
state: test.state,
|
||||
}
|
||||
p := &ParticipantImpl{}
|
||||
p.state.Store(test.state)
|
||||
assert.Equal(t, test.ready, p.IsReady())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user