From 2d2712a40ce219b007750bb81ea422cb3003f2a5 Mon Sep 17 00:00:00 2001 From: Max Revitt Date: Wed, 19 Jun 2024 11:29:06 +0200 Subject: [PATCH] fix(test): policy test temp dir creation (#645) * fix(test): policy test temp dir creation * fix(test): increase timeout of test in makefile --- Makefile | 4 ++-- zk/txpool/policy_test.go | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b4e93b45bf7..562bd2ebf74 100644 --- a/Makefile +++ b/Makefile @@ -149,10 +149,10 @@ db-tools: ## test: run unit tests with a 100s timeout test: - $(GOTEST) --timeout 100s + $(GOTEST) --timeout 200s test3: - $(GOTEST) --timeout 100s -tags $(BUILD_TAGS),erigon3 + $(GOTEST) --timeout 200s -tags $(BUILD_TAGS),erigon3 ## test-integration: run integration tests with a 30m timeout test-integration: diff --git a/zk/txpool/policy_test.go b/zk/txpool/policy_test.go index fd6b14ba012..0a1a22fd26d 100644 --- a/zk/txpool/policy_test.go +++ b/zk/txpool/policy_test.go @@ -21,11 +21,7 @@ func newTestACLDB(tb testing.TB, dir string) kv.RwDB { tb.Helper() if dir == "" { - dir = fmt.Sprintf("/tmp/acl-db-temp_%v", time.Now().UTC().Format(time.RFC3339Nano)) - - if err := os.Mkdir(dir, 0775); err != nil { - tb.Fatal(err) - } + dir = tb.TempDir() } state, err := OpenACLDB(context.Background(), dir)