diff --git a/e2e/random/query.go b/e2e/random/query.go index 6bd18375..3640536e 100644 --- a/e2e/random/query.go +++ b/e2e/random/query.go @@ -115,6 +115,7 @@ func (s *QueryTestSuite) TestQueryCmd() { requestID := txResult.Events[8].Attributes[0].Value heightStr := txResult.Events[8].Attributes[2].Value requestHeight, err := strconv.ParseInt(heightStr, 10, 64) + s.Require().NoError(err) // ------test GetCmdQueryRandomRequestQueue()------------- url := fmt.Sprintf("%s/irismod/random/queue", baseURL) diff --git a/e2e/random/tx.go b/e2e/random/tx.go index 2ec53215..3c96c9a2 100644 --- a/e2e/random/tx.go +++ b/e2e/random/tx.go @@ -112,7 +112,6 @@ func (s *TxTestSuite) TestTxCmd() { requestID := txResult.Events[8].Attributes[0].Value heightStr := txResult.Events[8].Attributes[2].Value requestHeight, err := strconv.ParseInt(heightStr, 10, 64) - s.Require().NoError(err) // ------test GetCmdQueryRandomRequestQueue()------------- diff --git a/e2e/sim_test.go b/e2e/sim_test.go index 7d58c3d6..187b6a57 100644 --- a/e2e/sim_test.go +++ b/e2e/sim_test.go @@ -430,9 +430,10 @@ func TestAppSimulationAfterImport(t *testing.T) { ) require.Equal(t, "SimApp", newApp.Name()) - newApp.InitChain(&abci.RequestInitChain{ + _, err = newApp.InitChain(&abci.RequestInitChain{ AppStateBytes: exported.AppState, }) + require.NoError(t, err) _, _, err = simulation.SimulateFromSeed( t, os.Stdout, diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 50267efe..ba42c265 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -752,7 +752,10 @@ func QueryBalanceExec( Address: address, Denom: denom, } - result, err := queryClient.Balance(context.Background(), req) + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + + result, err := queryClient.Balance(ctx, req) if err != nil { t.Fatalf("failed to query balances: %v", err) }