Skip to content

Commit

Permalink
Fixes race condition in test
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzaldysanchez committed Aug 12, 2024
1 parent 54de5e6 commit 330dd62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/services/registrysyncer/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"math/big"
"sync"
"testing"
"time"

Expand Down Expand Up @@ -131,9 +132,12 @@ func randomWord() [32]byte {

type launcher struct {
localRegistry *registrysyncer.LocalRegistry
mu sync.RWMutex
}

func (l *launcher) Launch(ctx context.Context, localRegistry *registrysyncer.LocalRegistry) error {
l.mu.Lock()
defer l.mu.Unlock()
l.localRegistry = localRegistry
return nil
}
Expand Down

0 comments on commit 330dd62

Please sign in to comment.