diff --git a/cmd/workload/filtertest.go b/cmd/workload/filtertest.go index 6504c345a4..cdd1d58090 100644 --- a/cmd/workload/filtertest.go +++ b/cmd/workload/filtertest.go @@ -110,9 +110,7 @@ func (s *filterTestSuite) filterFullRange(t *utesting.T) { func (s *filterTestSuite) queryAndCheck(t *utesting.T, query *filterQuery) { query.run(s.cfg.client) if query.Err != nil { - if errIsPrunedHistory(query.Err) { - t.Logf("test case accessed pruned history") - } else { + if !errIsPrunedHistory(query.Err) { t.Errorf("Filter query failed (fromBlock: %d toBlock: %d addresses: %v topics: %v error: %v)", query.FromBlock, query.ToBlock, query.Address, query.Topics, query.Err) } return @@ -131,9 +129,7 @@ func (s *filterTestSuite) fullRangeQueryAndCheck(t *utesting.T, query *filterQue } frQuery.run(s.cfg.client) if frQuery.Err != nil { - if errIsPrunedHistory(frQuery.Err) { - t.Logf("test case accessed pruned history") - } else { + if !errIsPrunedHistory(frQuery.Err) { t.Errorf("Full range filter query failed (addresses: %v topics: %v error: %v)", frQuery.Address, frQuery.Topics, frQuery.Err) } return diff --git a/cmd/workload/historytest.go b/cmd/workload/historytest.go index 841e3f2ab4..d5a38b4bb9 100644 --- a/cmd/workload/historytest.go +++ b/cmd/workload/historytest.go @@ -122,7 +122,6 @@ func (s *historyTestSuite) testGetBlockByHash(t *utesting.T) { b, err := s.cfg.client.getBlockByHash(ctx, bhash, false) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -145,7 +144,6 @@ func (s *historyTestSuite) testGetBlockByNumber(t *utesting.T) { b, err := s.cfg.client.getBlockByNumber(ctx, num, false) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -168,7 +166,6 @@ func (s *historyTestSuite) testGetBlockTransactionCountByHash(t *utesting.T) { count, err := s.cfg.client.getBlockTransactionCountByHash(ctx, bhash) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -188,7 +185,6 @@ func (s *historyTestSuite) testGetBlockTransactionCountByNumber(t *utesting.T) { count, err := s.cfg.client.getBlockTransactionCountByNumber(ctx, num) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -208,7 +204,6 @@ func (s *historyTestSuite) testGetBlockReceiptsByHash(t *utesting.T) { receipts, err := s.cfg.client.getBlockReceipts(ctx, bhash) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -229,7 +224,6 @@ func (s *historyTestSuite) testGetBlockReceiptsByNumber(t *utesting.T) { receipts, err := s.cfg.client.getBlockReceipts(ctx, hexutil.Uint64(num)) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -256,7 +250,6 @@ func (s *historyTestSuite) testGetTransactionByBlockHashAndIndex(t *utesting.T) tx, err := s.cfg.client.getTransactionByBlockHashAndIndex(ctx, bhash, uint64(txIndex)) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err) @@ -285,7 +278,6 @@ func (s *historyTestSuite) testGetTransactionByBlockNumberAndIndex(t *utesting.T tx, err := s.cfg.client.getTransactionByBlockNumberAndIndex(ctx, num, uint64(txIndex)) if err != nil { if errIsPrunedHistory(err) { - t.Logf("test case accessed pruned history") continue } t.Fatalf("block %d (hash %v): error %v", num, bhash, err)