From ef88b4dfce6315d114827f3dd723e34c74fea764 Mon Sep 17 00:00:00 2001 From: anshalshukla Date: Thu, 5 Sep 2024 13:46:37 +0530 Subject: [PATCH] fix: parallelise tests in core --- cmd/geth/consolecmd.go | 4 ++-- core/blockchain_repair_test.go | 1 + core/blockchain_snapshot_test.go | 4 ++++ eth/filters/filter_system.go | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index 4ed273c421..954e183b45 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -74,8 +74,8 @@ JavaScript API. See https://geth.ethereum.org/docs/interacting-with-geth/javascr func localConsole(ctx *cli.Context) error { // Create and start the node based on the CLI flags prepare(ctx) - stack := makeFullNode(ctx) - startNode(ctx, stack, true) + stack, backend := makeFullNode(ctx) + startNode(ctx, stack, backend, true) defer stack.Close() // Attach to the newly started node and create the JavaScript console. diff --git a/core/blockchain_repair_test.go b/core/blockchain_repair_test.go index a4f4d24f76..dde89e6f5c 100644 --- a/core/blockchain_repair_test.go +++ b/core/blockchain_repair_test.go @@ -1756,6 +1756,7 @@ func testLongReorgedSnapSyncingDeepRepair(t *testing.T, snapshots bool) { } func testRepair(t *testing.T, tt *rewindTest, snapshots bool) { + t.Parallel() for _, scheme := range []string{rawdb.HashScheme, rawdb.PathScheme} { testRepairWithScheme(t, tt, snapshots, scheme) } diff --git a/core/blockchain_snapshot_test.go b/core/blockchain_snapshot_test.go index c9032ac6d0..29dd9ecba0 100644 --- a/core/blockchain_snapshot_test.go +++ b/core/blockchain_snapshot_test.go @@ -530,6 +530,8 @@ func TestLowCommitCrashWithNewSnapshot(t *testing.T) { // Expected head fast block: C8 // Expected head block : C2 // Expected snapshot disk : C4 + + t.Parallel() for _, scheme := range []string{rawdb.HashScheme, rawdb.PathScheme} { test := &crashSnapshotTest{ snapshotTestBasic{ @@ -572,6 +574,8 @@ func TestHighCommitCrashWithNewSnapshot(t *testing.T) { // Expected head fast block: C8 // Expected head block : G // Expected snapshot disk : C4 + + t.Parallel() for _, scheme := range []string{rawdb.HashScheme, rawdb.PathScheme} { expHead := uint64(0) if scheme == rawdb.PathScheme { diff --git a/eth/filters/filter_system.go b/eth/filters/filter_system.go index 02a8238ffb..371e0bb43a 100644 --- a/eth/filters/filter_system.go +++ b/eth/filters/filter_system.go @@ -187,7 +187,7 @@ const ( rmLogsChanSize = 10 // logsChanSize is the size of channel listening to LogsEvent. // Updated to fix TestEth2NeBlock testcase, as the feed was unable to send - // logs to the channel. check - @anshalshukla + // logs to the channel. todo: @anshalshukla logsChanSize = 100 // chainEvChanSize is the size of channel listening to ChainEvent. chainEvChanSize = 10