From 8372f546c51a4c3cd5f30967b18716d25246d346 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Tue, 23 Aug 2022 16:09:19 +0200 Subject: [PATCH] fix: `TestIntegrationTestSuite/TestQueryBySig` flakyness (#12990) --- tests/e2e/tx/service_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/e2e/tx/service_test.go b/tests/e2e/tx/service_test.go index da6905d849ab..4f3790b060ad 100644 --- a/tests/e2e/tx/service_test.go +++ b/tests/e2e/tx/service_test.go @@ -118,8 +118,11 @@ func (s *IntegrationTestSuite) TestQueryBySig() { txb := s.mkTxBuilder() txbz, err := s.cfg.TxConfig.TxEncoder()(txb.GetTx()) s.Require().NoError(err) - _, err = s.queryClient.BroadcastTx(context.Background(), &tx.BroadcastTxRequest{TxBytes: txbz, Mode: tx.BroadcastMode_BROADCAST_MODE_BLOCK}) + resp, err := s.queryClient.BroadcastTx(context.Background(), &tx.BroadcastTxRequest{TxBytes: txbz, Mode: tx.BroadcastMode_BROADCAST_MODE_SYNC}) s.Require().NoError(err) + s.Require().NotEmpty(resp.TxResponse.TxHash) + + s.Require().NoError(s.network.WaitForNextBlock()) // get the signature out of the builder sigs, err := txb.GetTx().GetSignaturesV2()