From 73dce97bf9970ce9b72f25005bf61c35a01b2647 Mon Sep 17 00:00:00 2001 From: Viacheslav Gonkivskyi Date: Tue, 3 Oct 2023 13:37:47 +0300 Subject: [PATCH] fix tests --- nodebuilder/tests/api_test.go | 4 ++-- nodebuilder/tests/sync_test.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nodebuilder/tests/api_test.go b/nodebuilder/tests/api_test.go index 2232328f5e..b33b022acf 100644 --- a/nodebuilder/tests/api_test.go +++ b/nodebuilder/tests/api_test.go @@ -131,7 +131,6 @@ func TestBlobRPC(t *testing.T) { // TestHeaderSubscription ensures that the header subscription over RPC works // as intended and gets canceled successfully after rpc context cancellation. func TestHeaderSubscription(t *testing.T) { - t.Skip() ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout) t.Cleanup(cancel) @@ -168,7 +167,8 @@ func TestHeaderSubscription(t *testing.T) { } // cancel subscription via context subcancel() - + _, ok := <-sub + require.False(t, ok) // stop the light node and expect no outstanding subscription errors err = light.Stop(ctx) require.NoError(t, err) diff --git a/nodebuilder/tests/sync_test.go b/nodebuilder/tests/sync_test.go index 0bb0e1c757..25cadd1c8f 100644 --- a/nodebuilder/tests/sync_test.go +++ b/nodebuilder/tests/sync_test.go @@ -245,6 +245,8 @@ func TestSyncStartStopLightWithBridge(t *testing.T) { light = sw.NewLightNode() require.NoError(t, light.Start(ctx)) + lightClient = getAdminClient(ctx, light, t) + // ensure when light node comes back up, it can sync the remainder of the chain it // missed while sleeping h, err = lightClient.Header.WaitForHeight(ctx, 40)