Skip to content

Commit

Permalink
TestState: share db (#8576)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Oct 25, 2023
1 parent 656c3d2 commit 7aa79a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ 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"
)

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()
Expand All @@ -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 {
Expand Down

0 comments on commit 7aa79a5

Please sign in to comment.