Skip to content

Commit 7781afd

Browse files
author
tac0turtle
committed
try global mutex
1 parent 8ccc753 commit 7781afd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

execution/evm/execution_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"os"
1111
"path/filepath"
1212
"strings"
13+
"sync"
1314
"testing"
1415
"time"
1516

@@ -253,10 +254,17 @@ func generateJWTSecret() (string, error) {
253254
return hex.EncodeToString(jwtSecret), nil
254255
}
255256

257+
// Global mutex to serialize Docker Compose operations
258+
var dockerMutex sync.Mutex
259+
256260
// setupTestRethEngine starts a reth container using docker-compose and returns the JWT secret
257261
func setupTestRethEngine(t *testing.T) string {
258262
t.Helper()
259263

264+
// Serialize Docker Compose operations
265+
dockerMutex.Lock()
266+
defer dockerMutex.Unlock()
267+
260268
// Get absolute path to docker directory
261269
dockerPath, err := filepath.Abs(DOCKER_PATH)
262270
require.NoError(t, err)

0 commit comments

Comments
 (0)