Fix race condition in TestService_Initialized (#8597)

This commit is contained in:
Victor Farazdagi
2021-03-12 00:16:40 +03:00
committed by GitHub
parent 286444a2ec
commit fa2084330b

View File

@@ -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()