Skip to content

Commit

Permalink
Fix race condition in TestService_Initialized (#8597)
Browse files Browse the repository at this point in the history
  • Loading branch information
farazdagi authored Mar 11, 2021
1 parent 286444a commit fa20843
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon-chain/sync/initial-sync/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ func TestService_Resync(t *testing.T) {
}

func TestService_Initialized(t *testing.T) {
s := NewService(context.Background(), &Config{})
s := NewService(context.Background(), &Config{
StateNotifier: &mock.MockStateNotifier{},
})
s.chainStarted.Set()
assert.Equal(t, true, s.Initialized())
s.chainStarted.UnSet()
Expand Down

0 comments on commit fa20843

Please sign in to comment.