From 7aa79a5bbb80b25b1d236de4665cf45d66c3d9db Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 25 Oct 2023 20:08:50 +0700 Subject: [PATCH] TestState: share db (#8576) --- tests/state_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/state_test.go b/tests/state_test.go index 711294ef6..844288364 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -28,9 +28,9 @@ import ( "testing" "github.com/ledgerwatch/erigon-lib/common/datadir" + "github.com/ledgerwatch/erigon/core/state/temporal" "github.com/ledgerwatch/log/v3" - "github.com/ledgerwatch/erigon/core/state/temporal" "github.com/ledgerwatch/erigon/core/vm" "github.com/ledgerwatch/erigon/eth/tracers/logger" ) @@ -38,7 +38,7 @@ import ( func TestState(t *testing.T) { defer log.Root().SetHandler(log.Root().GetHandler()) log.Root().SetHandler(log.LvlFilterHandler(log.LvlError, log.StderrHandler)) - if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + if runtime.GOOS == "windows" { t.Skip("fix me on win please") // it's too slow on win and stops on macos, need generally improve speed of this tests } //t.Parallel() @@ -49,12 +49,12 @@ func TestState(t *testing.T) { st.skipLoad(`^stTimeConsuming/`) st.skipLoad(`.*vmPerformance/loop.*`) + _, db, _ := temporal.NewTestDB(t, datadir.New(t.TempDir()), nil) st.walk(t, stateTestDir, func(t *testing.T, name string, test *StateTest) { for _, subtest := range test.Subtests() { subtest := subtest key := fmt.Sprintf("%s/%d", subtest.Fork, subtest.Index) t.Run(key, func(t *testing.T) { - _, db, _ := temporal.NewTestDB(t, datadir.New(t.TempDir()), nil) withTrace(t, func(vmconfig vm.Config) error { tx, err := db.BeginRw(context.Background()) if err != nil {