Fixes from probe controller refactor (#3222)

* Fixes from probe controller refactor

* fmt

* static check
This commit is contained in:
Raja Subramanian
2024-11-30 13:34:01 +05:30
committed by GitHub
parent c76fb0bcf4
commit 8bb29c3a7b
10 changed files with 78 additions and 28 deletions
+4 -3
View File
@@ -19,9 +19,10 @@ import (
"log"
"net"
"os"
"sync/atomic"
"testing"
"go.uber.org/atomic"
"github.com/ory/dockertest/v3"
)
@@ -58,11 +59,11 @@ func waitTCPPort(t testing.TB, addr string) {
}
}
var redisLast uint32
var redisLast atomic.Uint32
func runRedis(t testing.TB) string {
c, err := Docker.RunWithOptions(&dockertest.RunOptions{
Name: fmt.Sprintf("lktest-redis-%d", atomic.AddUint32(&redisLast, 1)),
Name: fmt.Sprintf("lktest-redis-%d", redisLast.Inc()),
Repository: "redis", Tag: "latest",
})
if err != nil {