diff --git a/container-engine-lib/lib/backend_impls/docker/docker_network_allocator/docker_network_allocator.go b/container-engine-lib/lib/backend_impls/docker/docker_network_allocator/docker_network_allocator.go index 83986f2479..d49cfca9d7 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_network_allocator/docker_network_allocator.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_network_allocator/docker_network_allocator.go @@ -3,7 +3,6 @@ package docker_network_allocator import ( "context" "fmt" - "math/rand" "net" "strings" "time" @@ -51,11 +50,6 @@ type DockerNetworkAllocator struct { } func NewDockerNetworkAllocator(dockerManager *docker_manager.DockerManager) *DockerNetworkAllocator { - // NOTE: If we need a deterministic rand seed anywhere else in the program, this will break it! The reason we do this - // here is because it's way more likely that we'll forget to seed the rand when using this class than it is that we need - // a deterministic rand seed - rand.Seed(time.Now().UnixNano()) - return &DockerNetworkAllocator{ isConstructedViaConstructor: true, dockerManager: dockerManager, diff --git a/grpc-file-transfer/golang/grpc_file_streaming/grpc_stream_io_test.go b/grpc-file-transfer/golang/grpc_file_streaming/grpc_stream_io_test.go index afd9e070ec..ebdc81d621 100644 --- a/grpc-file-transfer/golang/grpc_file_streaming/grpc_stream_io_test.go +++ b/grpc-file-transfer/golang/grpc_file_streaming/grpc_stream_io_test.go @@ -2,11 +2,12 @@ package grpc_file_streaming import ( "bytes" + "crypto/rand" "fmt" + "testing" + "github.com/kurtosis-tech/stacktrace" "github.com/stretchr/testify/require" - "math/rand" - "testing" ) const ( diff --git a/internal_testsuites/golang/test_helpers/test_helpers.go b/internal_testsuites/golang/test_helpers/test_helpers.go index 459e062795..c84b6bc424 100644 --- a/internal_testsuites/golang/test_helpers/test_helpers.go +++ b/internal_testsuites/golang/test_helpers/test_helpers.go @@ -2,11 +2,10 @@ package test_helpers import ( "context" + "crypto/rand" "encoding/json" "fmt" - "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/starlark_run_config" "io" - "math/rand" "net/http" "os" "path" @@ -14,6 +13,8 @@ import ( "testing" "time" + "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/starlark_run_config" + "github.com/golang/protobuf/ptypes/empty" "github.com/kurtosis-tech/example-api-server/api/golang/example_api_server_rpc_api_bindings" "github.com/kurtosis-tech/example-api-server/api/golang/example_api_server_rpc_api_consts"