From ae2bad6e7e1ac31bba4911069c49c797f7d7e9dc Mon Sep 17 00:00:00 2001 From: kishansagathiya Date: Wed, 18 Sep 2024 16:32:37 +0530 Subject: [PATCH] fixing more tests --- dot/parachain/collator-protocol/validator_side_test.go | 4 +--- dot/parachain/overseer/mockable_overseer.go | 9 --------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/dot/parachain/collator-protocol/validator_side_test.go b/dot/parachain/collator-protocol/validator_side_test.go index f5e839f4e4..63caadb2e2 100644 --- a/dot/parachain/collator-protocol/validator_side_test.go +++ b/dot/parachain/collator-protocol/validator_side_test.go @@ -436,6 +436,7 @@ func TestProcessBackedOverseerMessage(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() overseer := overseer.NewMockableOverseer(t) + overseer.ExpectActions(c.expectedActions...) collationProtocolID := "/6761727661676500000000000000000000000000000000000000000000000000/1/collations/1" @@ -453,9 +454,6 @@ func TestProcessBackedOverseerMessage(t *testing.T) { defer overseer.Stop() - // overseer.ReceiveMessage(c.msg) - overseer.ExpectActions(c.expectedActions...) - time.Sleep(1 * time.Second) lenBlackedAdvertisementsBefore := len(cpvs.BlockedAdvertisements) diff --git a/dot/parachain/overseer/mockable_overseer.go b/dot/parachain/overseer/mockable_overseer.go index 85f74780af..4e95a95bab 100644 --- a/dot/parachain/overseer/mockable_overseer.go +++ b/dot/parachain/overseer/mockable_overseer.go @@ -100,15 +100,6 @@ func (m *MockableOverseer) processMessages() { m.t.Errorf("unexpected message: %T", msg) return } - case <-m.ctx.Done(): - if actionIndex < len(m.actionsForExpectedMessages) { - m.t.Errorf("expected %d overseer actions, but got only %d", len(m.actionsForExpectedMessages), actionIndex) - } - - if err := m.ctx.Err(); err != nil { - m.t.Logf("ctx error: %v\n", err) - } - return } } }