From 05e5f75e295d0b8d45a1866ea22e15ae63b9d6ad Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Mon, 11 Sep 2023 18:47:59 +0000 Subject: [PATCH] Try to make TestAdminEvents more stable --- config/presets/standalone.go | 4 ++-- node/node_test.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/presets/standalone.go b/config/presets/standalone.go index 043723bbf24..bb883db0aae 100644 --- a/config/presets/standalone.go +++ b/config/presets/standalone.go @@ -76,8 +76,8 @@ func standalone() config.Config { conf.Beacon.VotesLimit = 100 conf.PoETServers = []string{"http://0.0.0.0:10010"} - conf.POET.GracePeriod = 10 * time.Second - conf.POET.RequestTimeout = 3 * time.Second + conf.POET.GracePeriod = 12 * time.Second + conf.POET.RequestTimeout = 4 * time.Second conf.POET.CycleGap = 30 * time.Second conf.POET.PhaseShift = 30 * time.Second diff --git a/node/node_test.go b/node/node_test.go index d7474c9adcd..ec6725156c8 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -1116,7 +1116,7 @@ func TestAdminEvents(t *testing.T) { grpc.WithBlock(), ) require.NoError(t, err) - t.Cleanup(func() { conn.Close() }) + t.Cleanup(func() { assert.NoError(t, conn.Close()) }) client := pb.NewAdminServiceClient(conn) tctx, cancel := context.WithTimeout(ctx, 2*time.Minute) @@ -1144,6 +1144,7 @@ func TestAdminEvents(t *testing.T) { require.NoError(t, err, "stream %d", i) require.IsType(t, ev, msg.Details, "stream %d", i) } + require.NoError(t, stream.CloseSend()) } }