From fa2084330bdb128380ef3eee65aca56fb52f9c55 Mon Sep 17 00:00:00 2001 From: Victor Farazdagi Date: Fri, 12 Mar 2021 00:16:40 +0300 Subject: [PATCH] Fix race condition in TestService_Initialized (#8597) --- beacon-chain/sync/initial-sync/service_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon-chain/sync/initial-sync/service_test.go b/beacon-chain/sync/initial-sync/service_test.go index 3531d05ed..7434851be 100644 --- a/beacon-chain/sync/initial-sync/service_test.go +++ b/beacon-chain/sync/initial-sync/service_test.go @@ -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()