Skip to content

consensus/ethash/ethash_etc_test.go — Version Comparison

v1.17.3 v1.17.4
Branch etc/v1.17.3-full-node etc/v1.17.4-full-node
Delta +170 -0 +177 -0

Diff between branches

diff --git a/consensus/ethash/ethash_etc_test.go b/consensus/ethash/ethash_etc_test.go
index 2eeb6e8a0..428666dbb 100644
--- a/consensus/ethash/ethash_etc_test.go
+++ b/consensus/ethash/ethash_etc_test.go
@@ -19,6 +19,7 @@ package ethash
 import (
    "math/big"
    "math/rand"
+   "os"
    "sync"
    "testing"
    "time"
@@ -55,7 +56,13 @@ func TestTestMode(t *testing.T) {
 // This test checks that cache lru logic doesn't crash under load.
 // It reproduces https://github.com/ethereum/go-ethereum/issues/14943
 func TestCacheFileEvict(t *testing.T) {
-   tmpdir := t.TempDir()
+   // TODO: t.TempDir fails to remove the directory on Windows
+   // \AppData\Local\Temp\1\TestCacheFileEvict2179435125\001\cache-R23-0000000000000000: Access is denied.
+   tmpdir, err := os.MkdirTemp("", "ethash-test") //nolint:usetesting // t.TempDir fails the test on the async cache-file cleanup race
+   if err != nil {
+       t.Fatal(err)
+   }
+   defer os.RemoveAll(tmpdir)

    config := Config{
        CachesInMem:  3,
← Back to Version Comparison