From c78a51f59dff06ff90355e22f0ae533f00cf7572 Mon Sep 17 00:00:00 2001 From: hbandura Date: Fri, 18 Feb 2022 19:13:11 -0300 Subject: [PATCH] Skipping flaky tests (#1848) This PR comments/skips tests, builds and benchmarks that are known to be flaky. Unit tests: - TestAnnounceGossipQueryMsg #1849 - TestEthClient/TestCallContract #1850 - TestGethClient/TestAccessList #1851 Benchmarks: - BenchmarkNet1000Txs #1852 Circleci builds: - end-to-end-cip35-eth-compatibility-test #1853 While creating this PR, the istanbul-e2e-coverage failed once, then worked when it was re-run. I'm not skipping this one right now since I'd like to test it a bit more. Most likely it is because the parent commit has flaky tests, which are run for coverage report. codecov/project is failing because we are removing a few tests. It is expected. --- .circleci/config.yml | 9 +++++---- consensus/istanbul/backend/announce_test.go | 1 + e2e_test/e2e_bench_test.go | 1 + e2e_test/e2e_test.go | 4 ++-- ethclient/ethclient_test.go | 8 +++++--- ethclient/gethclient/gethclient_test.go | 8 +++++--- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ec9c51095..a3635a5aee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -545,10 +545,11 @@ workflows: requires: - checkout-monorepo - build-geth - - end-to-end-cip35-eth-compatibility-test: - requires: - - checkout-monorepo - - build-geth +# Flaky! +# - end-to-end-cip35-eth-compatibility-test: +# requires: +# - checkout-monorepo +# - build-geth - end-to-end-replica-test: requires: - checkout-monorepo diff --git a/consensus/istanbul/backend/announce_test.go b/consensus/istanbul/backend/announce_test.go index d7b237e7bb..f3e04ae37e 100644 --- a/consensus/istanbul/backend/announce_test.go +++ b/consensus/istanbul/backend/announce_test.go @@ -16,6 +16,7 @@ import ( // This test function will test the announce message generator and handler. // It will also test the gossip query generator and handler. func TestAnnounceGossipQueryMsg(t *testing.T) { + t.Skip() // Flaky // Create three backends numValidators := 3 genesisCfg, nodeKeys := getGenesisAndKeys(numValidators, true) diff --git a/e2e_test/e2e_bench_test.go b/e2e_test/e2e_bench_test.go index cdb75f24fc..0b61627d08 100644 --- a/e2e_test/e2e_bench_test.go +++ b/e2e_test/e2e_bench_test.go @@ -33,6 +33,7 @@ func BenchmarkNet100EmptyBlocks(b *testing.B) { } func BenchmarkNet1000Txs(b *testing.B) { + b.Skip() // Flaky // Seed the random number generator so that the generated numbers are // different on each run. rand.Seed(time.Now().UnixNano()) diff --git a/e2e_test/e2e_test.go b/e2e_test/e2e_test.go index d2ba70da2d..512a5f72cd 100644 --- a/e2e_test/e2e_test.go +++ b/e2e_test/e2e_test.go @@ -249,7 +249,7 @@ func TestRPCDynamicTxGasPriceWithState(t *testing.T) { network, shutdown, err := test.NewNetwork(ac, gc, ec) require.NoError(t, err) defer shutdown() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*90) defer cancel() accounts := test.Accounts(ac.DeveloperAccounts(), gc.ChainConfig()) @@ -306,7 +306,7 @@ func TestRPCDynamicTxGasPriceWithoutState(t *testing.T) { network, shutdown, err := test.NewNetwork(ac, gc, ec) require.NoError(t, err) defer shutdown() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*90) defer cancel() accounts := test.Accounts(ac.DeveloperAccounts(), gc.ChainConfig()) diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index 5ee835a4ee..63f82af707 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -260,9 +260,10 @@ func TestEthClient(t *testing.T) { "TestStatusFunctions": { func(t *testing.T) { testStatusFunctions(t, client) }, }, - "TestCallContract": { - func(t *testing.T) { testCallContract(t, client) }, - }, + // Flaky + // "TestCallContract": { + // func(t *testing.T) { testCallContract(t, client) }, + // }, "TestAtFunctions": { func(t *testing.T) { testAtFunctions(t, client) }, }, @@ -476,6 +477,7 @@ func testStatusFunctions(t *testing.T, client *rpc.Client) { } } +// nolint:deadcode func testCallContract(t *testing.T, client *rpc.Client) { ec := NewClient(client) diff --git a/ethclient/gethclient/gethclient_test.go b/ethclient/gethclient/gethclient_test.go index e81800552a..aba375186a 100644 --- a/ethclient/gethclient/gethclient_test.go +++ b/ethclient/gethclient/gethclient_test.go @@ -99,9 +99,10 @@ func TestGethClient(t *testing.T) { tests := map[string]struct { test func(t *testing.T) }{ - "TestAccessList": { - func(t *testing.T) { testAccessList(t, client) }, - }, + // Flaky + // "TestAccessList": { + // func(t *testing.T) { testAccessList(t, client) }, + // }, "TestGetProof": { func(t *testing.T) { testGetProof(t, client) }, }, @@ -130,6 +131,7 @@ func TestGethClient(t *testing.T) { } } +// nolint:deadcode func testAccessList(t *testing.T, client *rpc.Client) { ec := New(client) // Test transfer