Skip to content

Commit

Permalink
fix: parallelise tests in core
Browse files Browse the repository at this point in the history
  • Loading branch information
anshalshukla committed Sep 5, 2024
1 parent a159bf7 commit ef88b4d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/geth/consolecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions core/blockchain_repair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 4 additions & 0 deletions core/blockchain_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion eth/filters/filter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef88b4d

Please sign in to comment.