Repository: jaegertracing/jaeger

Issue:
Move pkg/testutils to internal/testutils
and update all references in the code.

Also a related issue for OTEL Contrib (trivial fix) https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/38540

Discussion:

Solution patch:
diff --git a/.golangci.yml b/.golangci.yml
index a3712d56..e5bb1668 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -139,7 +139,7 @@ linters-settings:
       disallow-uber/goleak:
         deny:
          - pkg: go.uber.org/goleak
-           desc: "Use github.com/jaegertracing/jaeger/pkg/testutils"
+           desc: "Use github.com/jaegertracing/jaeger/internal/testutils"
         files:
           - "**_test.go"
 



Test patch:
diff --git a/cmd/agent/app/agent_test.go b/cmd/agent/app/agent_test.go
index 0cd3cb08..6c167a3c 100644
--- a/cmd/agent/app/agent_test.go
+++ b/cmd/agent/app/agent_test.go
@@ -18,8 +18,8 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/jaegertracing/jaeger/internal/metrics/metricsbuilder"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestAgentStartError(t *testing.T) {
diff --git a/cmd/agent/app/configmanager/grpc/manager_test.go b/cmd/agent/app/configmanager/grpc/manager_test.go
index 1c1129c2..35049c42 100644
--- a/cmd/agent/app/configmanager/grpc/manager_test.go
+++ b/cmd/agent/app/configmanager/grpc/manager_test.go
@@ -14,7 +14,7 @@ import (
 	"google.golang.org/grpc/credentials/insecure"
 
 	"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestSamplingManager_GetSamplingStrategy(t *testing.T) {
diff --git a/cmd/agent/app/configmanager/metrics_test.go b/cmd/agent/app/configmanager/metrics_test.go
index e9aad175..35978ce8 100644
--- a/cmd/agent/app/configmanager/metrics_test.go
+++ b/cmd/agent/app/configmanager/metrics_test.go
@@ -13,7 +13,7 @@ import (
 
 	"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
 	"github.com/jaegertracing/jaeger/internal/metricstest"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 type noopManager struct{}
diff --git a/cmd/agent/app/customtransport/buffered_read_transport_test.go b/cmd/agent/app/customtransport/buffered_read_transport_test.go
index c9adf7b7..42b46b37 100644
--- a/cmd/agent/app/customtransport/buffered_read_transport_test.go
+++ b/cmd/agent/app/customtransport/buffered_read_transport_test.go
@@ -11,7 +11,7 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 // TestTBufferedReadTransport tests the TBufferedReadTransport
diff --git a/cmd/agent/app/httpserver/srv_test.go b/cmd/agent/app/httpserver/srv_test.go
index c81d5ee9..ed503e3f 100644
--- a/cmd/agent/app/httpserver/srv_test.go
+++ b/cmd/agent/app/httpserver/srv_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"go.uber.org/zap"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestHTTPServer(t *testing.T) {
diff --git a/cmd/agent/app/package_test.go b/cmd/agent/app/package_test.go
index 5946e183..4a633786 100644
--- a/cmd/agent/app/package_test.go
+++ b/cmd/agent/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/agent/app/processors/package_test.go b/cmd/agent/app/processors/package_test.go
index 06c40acd..364512b7 100644
--- a/cmd/agent/app/processors/package_test.go
+++ b/cmd/agent/app/processors/package_test.go
@@ -6,7 +6,7 @@ package processors
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/agent/app/reporter/grpc/package_test.go b/cmd/agent/app/reporter/grpc/package_test.go
index aee3b231..05c61c87 100644
--- a/cmd/agent/app/reporter/grpc/package_test.go
+++ b/cmd/agent/app/reporter/grpc/package_test.go
@@ -6,7 +6,7 @@ package grpc
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/agent/app/reporter/package_test.go b/cmd/agent/app/reporter/package_test.go
index b4c36d76..6f55d1d0 100644
--- a/cmd/agent/app/reporter/package_test.go
+++ b/cmd/agent/app/reporter/package_test.go
@@ -6,7 +6,7 @@ package reporter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/agent/app/servers/server_test.go b/cmd/agent/app/servers/server_test.go
index 3bb3d74f..4e1703f4 100644
--- a/cmd/agent/app/servers/server_test.go
+++ b/cmd/agent/app/servers/server_test.go
@@ -11,7 +11,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestReadBuf_EOF(t *testing.T) {
diff --git a/cmd/agent/app/servers/thriftudp/transport_test.go b/cmd/agent/app/servers/thriftudp/transport_test.go
index 7266ce1a..14fd51f9 100644
--- a/cmd/agent/app/servers/thriftudp/transport_test.go
+++ b/cmd/agent/app/servers/thriftudp/transport_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 var localListenAddr = &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}
diff --git a/cmd/agent/app/testutils/package_test.go b/cmd/agent/app/testutils/package_test.go
index 21d173c6..719954d5 100644
--- a/cmd/agent/app/testutils/package_test.go
+++ b/cmd/agent/app/testutils/package_test.go
@@ -6,7 +6,7 @@ package testutils
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/all-in-one/package_test.go b/cmd/all-in-one/package_test.go
index 3694f7ca..654cfe72 100644
--- a/cmd/all-in-one/package_test.go
+++ b/cmd/all-in-one/package_test.go
@@ -6,7 +6,7 @@ package main
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/all-in-one/setupcontext/setupcontext_test.go b/cmd/all-in-one/setupcontext/setupcontext_test.go
index b68d4c27..5da20a0e 100644
--- a/cmd/all-in-one/setupcontext/setupcontext_test.go
+++ b/cmd/all-in-one/setupcontext/setupcontext_test.go
@@ -8,7 +8,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestSetupContext(t *testing.T) {
diff --git a/cmd/anonymizer/app/anonymizer/package_test.go b/cmd/anonymizer/app/anonymizer/package_test.go
index a550d335..a5c95593 100644
--- a/cmd/anonymizer/app/anonymizer/package_test.go
+++ b/cmd/anonymizer/app/anonymizer/package_test.go
@@ -6,7 +6,7 @@ package anonymizer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/anonymizer/app/flags_test.go b/cmd/anonymizer/app/flags_test.go
index 08b6bbb8..09307a0e 100644
--- a/cmd/anonymizer/app/flags_test.go
+++ b/cmd/anonymizer/app/flags_test.go
@@ -9,7 +9,7 @@ import (
 	"github.com/spf13/cobra"
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestOptionsWithDefaultFlags(t *testing.T) {
diff --git a/cmd/anonymizer/app/query/package_test.go b/cmd/anonymizer/app/query/package_test.go
index ccd4e1f8..d61a286f 100644
--- a/cmd/anonymizer/app/query/package_test.go
+++ b/cmd/anonymizer/app/query/package_test.go
@@ -6,7 +6,7 @@ package query
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/anonymizer/app/uiconv/package_test.go b/cmd/anonymizer/app/uiconv/package_test.go
index 9344eea3..5606ba6f 100644
--- a/cmd/anonymizer/app/uiconv/package_test.go
+++ b/cmd/anonymizer/app/uiconv/package_test.go
@@ -6,7 +6,7 @@ package uiconv
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/anonymizer/app/writer/package_test.go b/cmd/anonymizer/app/writer/package_test.go
index a77bb0fe..4943c86f 100644
--- a/cmd/anonymizer/app/writer/package_test.go
+++ b/cmd/anonymizer/app/writer/package_test.go
@@ -6,7 +6,7 @@ package writer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/flags/flags_test.go b/cmd/collector/app/flags/flags_test.go
index 003ce664..ea9b3fa9 100644
--- a/cmd/collector/app/flags/flags_test.go
+++ b/cmd/collector/app/flags/flags_test.go
@@ -11,8 +11,8 @@ import (
 	"github.com/stretchr/testify/require"
 	"go.uber.org/zap"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestCollectorOptionsWithFlags_CheckHostPort(t *testing.T) {
diff --git a/cmd/collector/app/handler/grpc_handler_test.go b/cmd/collector/app/handler/grpc_handler_test.go
index 36e564b2..64b6240d 100644
--- a/cmd/collector/app/handler/grpc_handler_test.go
+++ b/cmd/collector/app/handler/grpc_handler_test.go
@@ -21,8 +21,8 @@ import (
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
 	"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var _ processor.SpanProcessor = (*mockSpanProcessor)(nil)
diff --git a/cmd/collector/app/handler/otlp_receiver_test.go b/cmd/collector/app/handler/otlp_receiver_test.go
index a582d287..9aad915a 100644
--- a/cmd/collector/app/handler/otlp_receiver_test.go
+++ b/cmd/collector/app/handler/otlp_receiver_test.go
@@ -24,8 +24,8 @@ import (
 
 	"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
 	"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func optionsWithPorts(port string) *flags.CollectorOptions {
diff --git a/cmd/collector/app/handler/package_test.go b/cmd/collector/app/handler/package_test.go
index a47f478a..af731481 100644
--- a/cmd/collector/app/handler/package_test.go
+++ b/cmd/collector/app/handler/package_test.go
@@ -6,7 +6,7 @@ package handler
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/handler/zipkin_receiver_test.go b/cmd/collector/app/handler/zipkin_receiver_test.go
index 50b1504b..fd19e5f6 100644
--- a/cmd/collector/app/handler/zipkin_receiver_test.go
+++ b/cmd/collector/app/handler/zipkin_receiver_test.go
@@ -25,9 +25,9 @@ import (
 	"github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore"
 	"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
 	"github.com/jaegertracing/jaeger/cmd/collector/app/processor"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	zipkinthrift "github.com/jaegertracing/jaeger/model/converter/thrift/zipkin"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 	zipkin_proto3 "github.com/jaegertracing/jaeger/proto-gen/zipkin"
 )
 
diff --git a/cmd/collector/app/handler/zipkin_receiver_tls_test.go b/cmd/collector/app/handler/zipkin_receiver_tls_test.go
index 108a1023..61d0b40f 100644
--- a/cmd/collector/app/handler/zipkin_receiver_tls_test.go
+++ b/cmd/collector/app/handler/zipkin_receiver_tls_test.go
@@ -16,8 +16,8 @@ import (
 	"go.opentelemetry.io/collector/config/configtls"
 
 	"github.com/jaegertracing/jaeger/cmd/collector/app/flags"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 	"github.com/jaegertracing/jaeger/ports"
 )
 
diff --git a/cmd/collector/app/package_test.go b/cmd/collector/app/package_test.go
index 5946e183..4a633786 100644
--- a/cmd/collector/app/package_test.go
+++ b/cmd/collector/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/processor/package_test.go b/cmd/collector/app/processor/package_test.go
index 9eef4869..16c54457 100644
--- a/cmd/collector/app/processor/package_test.go
+++ b/cmd/collector/app/processor/package_test.go
@@ -6,7 +6,7 @@ package processor
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/sanitizer/cache/auto_refresh_cache_test.go b/cmd/collector/app/sanitizer/cache/auto_refresh_cache_test.go
index 66a91bf3..a631e119 100644
--- a/cmd/collector/app/sanitizer/cache/auto_refresh_cache_test.go
+++ b/cmd/collector/app/sanitizer/cache/auto_refresh_cache_test.go
@@ -14,7 +14,7 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/jaegertracing/jaeger/cmd/collector/app/sanitizer/cache/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 var (
diff --git a/cmd/collector/app/sanitizer/package_test.go b/cmd/collector/app/sanitizer/package_test.go
index bae7fe4b..82bdf0df 100644
--- a/cmd/collector/app/sanitizer/package_test.go
+++ b/cmd/collector/app/sanitizer/package_test.go
@@ -6,7 +6,7 @@ package sanitizer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/sanitizer/zipkin/span_sanitizer_test.go b/cmd/collector/app/sanitizer/zipkin/span_sanitizer_test.go
index b8dd9e36..c63925a2 100644
--- a/cmd/collector/app/sanitizer/zipkin/span_sanitizer_test.go
+++ b/cmd/collector/app/sanitizer/zipkin/span_sanitizer_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	"github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 var (
diff --git a/cmd/collector/app/server/package_test.go b/cmd/collector/app/server/package_test.go
index b6e32513..2b3a80d0 100644
--- a/cmd/collector/app/server/package_test.go
+++ b/cmd/collector/app/server/package_test.go
@@ -6,7 +6,7 @@ package server
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/collector/app/span_processor_test.go b/cmd/collector/app/span_processor_test.go
index 606841a2..d53092a7 100644
--- a/cmd/collector/app/span_processor_test.go
+++ b/cmd/collector/app/span_processor_test.go
@@ -45,9 +45,9 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore/mocks"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var (
diff --git a/cmd/es-index-cleaner/app/package_test.go b/cmd/es-index-cleaner/app/package_test.go
index 95b40e15..6500a2a3 100644
--- a/cmd/es-index-cleaner/app/package_test.go
+++ b/cmd/es-index-cleaner/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/es-rollover/app/init/package_test.go b/cmd/es-rollover/app/init/package_test.go
index e0d8864a..2af91e99 100644
--- a/cmd/es-rollover/app/init/package_test.go
+++ b/cmd/es-rollover/app/init/package_test.go
@@ -6,7 +6,7 @@ package init
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/es-rollover/app/lookback/package_test.go b/cmd/es-rollover/app/lookback/package_test.go
index 885413e9..3f135064 100644
--- a/cmd/es-rollover/app/lookback/package_test.go
+++ b/cmd/es-rollover/app/lookback/package_test.go
@@ -6,7 +6,7 @@ package lookback
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/es-rollover/app/package_test.go b/cmd/es-rollover/app/package_test.go
index 95b40e15..6500a2a3 100644
--- a/cmd/es-rollover/app/package_test.go
+++ b/cmd/es-rollover/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/es-rollover/app/rollover/package_test.go b/cmd/es-rollover/app/rollover/package_test.go
index 68d9f419..00465c5a 100644
--- a/cmd/es-rollover/app/rollover/package_test.go
+++ b/cmd/es-rollover/app/rollover/package_test.go
@@ -6,7 +6,7 @@ package rollover
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/ingester/app/builder/empty_test.go b/cmd/ingester/app/builder/empty_test.go
index 216eb5d7..6c72d5a7 100644
--- a/cmd/ingester/app/builder/empty_test.go
+++ b/cmd/ingester/app/builder/empty_test.go
@@ -6,7 +6,7 @@ package builder
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/ingester/app/consumer/offset/package_test.go b/cmd/ingester/app/consumer/offset/package_test.go
index 631aa4ea..831ce7c1 100644
--- a/cmd/ingester/app/consumer/offset/package_test.go
+++ b/cmd/ingester/app/consumer/offset/package_test.go
@@ -6,7 +6,7 @@ package offset
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/ingester/app/consumer/package_test.go b/cmd/ingester/app/consumer/package_test.go
index 14e90a3a..d9f07771 100644
--- a/cmd/ingester/app/consumer/package_test.go
+++ b/cmd/ingester/app/consumer/package_test.go
@@ -6,7 +6,7 @@ package consumer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/ingester/app/flags_test.go b/cmd/ingester/app/flags_test.go
index b63d2d7c..4b684cb0 100644
--- a/cmd/ingester/app/flags_test.go
+++ b/cmd/ingester/app/flags_test.go
@@ -13,9 +13,9 @@ import (
 	"go.opentelemetry.io/collector/config/configtls"
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/kafka"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/kafka/auth"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestOptionsWithFlags(t *testing.T) {
diff --git a/cmd/ingester/app/processor/decorator/retry_test.go b/cmd/ingester/app/processor/decorator/retry_test.go
index 2c7ef79d..b93a1813 100644
--- a/cmd/ingester/app/processor/decorator/retry_test.go
+++ b/cmd/ingester/app/processor/decorator/retry_test.go
@@ -13,8 +13,8 @@ import (
 
 	"github.com/jaegertracing/jaeger/cmd/ingester/app/processor/mocks"
 	"github.com/jaegertracing/jaeger/internal/metricstest"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type fakeMsg struct{}
diff --git a/cmd/ingester/app/processor/package_test.go b/cmd/ingester/app/processor/package_test.go
index 171b6eed..fe368e54 100644
--- a/cmd/ingester/app/processor/package_test.go
+++ b/cmd/ingester/app/processor/package_test.go
@@ -6,7 +6,7 @@ package processor
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/internal/docs/command_test.go b/cmd/internal/docs/command_test.go
index fa28843b..d99d7f6f 100644
--- a/cmd/internal/docs/command_test.go
+++ b/cmd/internal/docs/command_test.go
@@ -12,7 +12,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestOutputFormats(t *testing.T) {
diff --git a/cmd/internal/env/command_test.go b/cmd/internal/env/command_test.go
index e18152c3..505e2946 100644
--- a/cmd/internal/env/command_test.go
+++ b/cmd/internal/env/command_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestCommand(t *testing.T) {
diff --git a/cmd/internal/flags/package_test.go b/cmd/internal/flags/package_test.go
index da12c003..f36b24ea 100644
--- a/cmd/internal/flags/package_test.go
+++ b/cmd/internal/flags/package_test.go
@@ -6,7 +6,7 @@ package flags
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/internal/printconfig/command_test.go b/cmd/internal/printconfig/command_test.go
index b02ca23b..85273f54 100644
--- a/cmd/internal/printconfig/command_test.go
+++ b/cmd/internal/printconfig/command_test.go
@@ -24,10 +24,10 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/config/tlscfg"
 	"github.com/jaegertracing/jaeger/pkg/tenancy"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const (
diff --git a/cmd/internal/status/command_test.go b/cmd/internal/status/command_test.go
index 19c53a6d..2078b16e 100644
--- a/cmd/internal/status/command_test.go
+++ b/cmd/internal/status/command_test.go
@@ -12,7 +12,7 @@ import (
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func readyHandler(w http.ResponseWriter, _ *http.Request) {
diff --git a/cmd/jaeger/internal/exporters/storageexporter/package_test.go b/cmd/jaeger/internal/exporters/storageexporter/package_test.go
index ebbbacc0..b5954f76 100644
--- a/cmd/jaeger/internal/exporters/storageexporter/package_test.go
+++ b/cmd/jaeger/internal/exporters/storageexporter/package_test.go
@@ -6,7 +6,7 @@ package storageexporter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/extension/expvar/package_test.go b/cmd/jaeger/internal/extension/expvar/package_test.go
index 8819b3ad..4623d01c 100644
--- a/cmd/jaeger/internal/extension/expvar/package_test.go
+++ b/cmd/jaeger/internal/extension/expvar/package_test.go
@@ -6,7 +6,7 @@ package expvar
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/extension/jaegerquery/package_test.go b/cmd/jaeger/internal/extension/jaegerquery/package_test.go
index 2fa454a6..c7aeb24b 100644
--- a/cmd/jaeger/internal/extension/jaegerquery/package_test.go
+++ b/cmd/jaeger/internal/extension/jaegerquery/package_test.go
@@ -6,7 +6,7 @@ package jaegerquery
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/extension/jaegerquery/server_test.go b/cmd/jaeger/internal/extension/jaegerquery/server_test.go
index 4596a5c0..3ecaa286 100644
--- a/cmd/jaeger/internal/extension/jaegerquery/server_test.go
+++ b/cmd/jaeger/internal/extension/jaegerquery/server_test.go
@@ -36,8 +36,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore"
 	tracestoremocks "github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore/mocks"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/telemetry"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type fakeFactory struct {
diff --git a/cmd/jaeger/internal/extension/jaegerstorage/package_test.go b/cmd/jaeger/internal/extension/jaegerstorage/package_test.go
index 5b38e0d5..13032f13 100644
--- a/cmd/jaeger/internal/extension/jaegerstorage/package_test.go
+++ b/cmd/jaeger/internal/extension/jaegerstorage/package_test.go
@@ -6,7 +6,7 @@ package jaegerstorage
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/extension/remotesampling/package_test.go b/cmd/jaeger/internal/extension/remotesampling/package_test.go
index 5bd9ea71..84de0aec 100644
--- a/cmd/jaeger/internal/extension/remotesampling/package_test.go
+++ b/cmd/jaeger/internal/extension/remotesampling/package_test.go
@@ -6,7 +6,7 @@ package remotesampling
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/integration/package_test.go b/cmd/jaeger/internal/integration/package_test.go
index f4fb9b5f..f05b1c7a 100644
--- a/cmd/jaeger/internal/integration/package_test.go
+++ b/cmd/jaeger/internal/integration/package_test.go
@@ -6,7 +6,7 @@ package integration
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/integration/storagecleaner/package_test.go b/cmd/jaeger/internal/integration/storagecleaner/package_test.go
index cec15912..b84be12e 100644
--- a/cmd/jaeger/internal/integration/storagecleaner/package_test.go
+++ b/cmd/jaeger/internal/integration/storagecleaner/package_test.go
@@ -6,7 +6,7 @@ package storagecleaner
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/package_test.go b/cmd/jaeger/internal/package_test.go
index bbfa715b..f9516a05 100644
--- a/cmd/jaeger/internal/package_test.go
+++ b/cmd/jaeger/internal/package_test.go
@@ -6,7 +6,7 @@ package internal
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/processors/adaptivesampling/package_test.go b/cmd/jaeger/internal/processors/adaptivesampling/package_test.go
index 10d46470..dcf92694 100644
--- a/cmd/jaeger/internal/processors/adaptivesampling/package_test.go
+++ b/cmd/jaeger/internal/processors/adaptivesampling/package_test.go
@@ -6,7 +6,7 @@ package adaptivesampling
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/internal/sanitizer/package_test.go b/cmd/jaeger/internal/sanitizer/package_test.go
index a7d22934..e604626f 100644
--- a/cmd/jaeger/internal/sanitizer/package_test.go
+++ b/cmd/jaeger/internal/sanitizer/package_test.go
@@ -6,7 +6,7 @@ package sanitizer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/jaeger/sanitizer/package_test.go b/cmd/jaeger/sanitizer/package_test.go
index bae7fe4b..82bdf0df 100644
--- a/cmd/jaeger/sanitizer/package_test.go
+++ b/cmd/jaeger/sanitizer/package_test.go
@@ -6,7 +6,7 @@ package sanitizer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/apiv3/http_gateway_test.go b/cmd/query/app/apiv3/http_gateway_test.go
index ff645014..8619e3d6 100644
--- a/cmd/query/app/apiv3/http_gateway_test.go
+++ b/cmd/query/app/apiv3/http_gateway_test.go
@@ -26,8 +26,8 @@ import (
 	dependencyStoreMocks "github.com/jaegertracing/jaeger/internal/storage/v2/api/depstore/mocks"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore"
 	tracestoremocks "github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore/mocks"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/jtracer"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func setupHTTPGatewayNoServer(
diff --git a/cmd/query/app/apiv3/package_test.go b/cmd/query/app/apiv3/package_test.go
index 61072ed8..2a82281a 100644
--- a/cmd/query/app/apiv3/package_test.go
+++ b/cmd/query/app/apiv3/package_test.go
@@ -6,7 +6,7 @@ package apiv3
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/flags_test.go b/cmd/query/app/flags_test.go
index a40751ee..2957dac9 100644
--- a/cmd/query/app/flags_test.go
+++ b/cmd/query/app/flags_test.go
@@ -16,8 +16,8 @@ import (
 
 	spanstoremocks "github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore/mocks"
 	storage "github.com/jaegertracing/jaeger/internal/storage/v1/factory"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 	"github.com/jaegertracing/jaeger/ports"
 )
 
diff --git a/cmd/query/app/package_test.go b/cmd/query/app/package_test.go
index 5946e183..4a633786 100644
--- a/cmd/query/app/package_test.go
+++ b/cmd/query/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/qualitymetrics/data_test.go b/cmd/query/app/qualitymetrics/data_test.go
index e1b43882..d0e7aa3f 100644
--- a/cmd/query/app/qualitymetrics/data_test.go
+++ b/cmd/query/app/qualitymetrics/data_test.go
@@ -8,7 +8,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestGetSampleData(t *testing.T) {
diff --git a/cmd/query/app/querysvc/query_service_test.go b/cmd/query/app/querysvc/query_service_test.go
index f0658ca1..5461c33d 100644
--- a/cmd/query/app/querysvc/query_service_test.go
+++ b/cmd/query/app/querysvc/query_service_test.go
@@ -25,8 +25,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore"
 	tracestoremocks "github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore/mocks"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const millisToNanosMultiplier = int64(time.Millisecond / time.Nanosecond)
diff --git a/cmd/query/app/querysvc/v2/adjuster/package_test.go b/cmd/query/app/querysvc/v2/adjuster/package_test.go
index d5e9585a..2a752e3a 100644
--- a/cmd/query/app/querysvc/v2/adjuster/package_test.go
+++ b/cmd/query/app/querysvc/v2/adjuster/package_test.go
@@ -6,7 +6,7 @@ package adjuster
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/querysvc/v2/querysvc/package_test.go b/cmd/query/app/querysvc/v2/querysvc/package_test.go
index 755423f8..1d3ad3b6 100644
--- a/cmd/query/app/querysvc/v2/querysvc/package_test.go
+++ b/cmd/query/app/querysvc/v2/querysvc/package_test.go
@@ -6,7 +6,7 @@ package querysvc
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/static_handler_test.go b/cmd/query/app/static_handler_test.go
index fa644eba..3a5ef930 100644
--- a/cmd/query/app/static_handler_test.go
+++ b/cmd/query/app/static_handler_test.go
@@ -24,7 +24,7 @@ import (
 	"go.uber.org/zap/zaptest/observer"
 
 	"github.com/jaegertracing/jaeger/cmd/query/app/querysvc"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 //go:generate mockery -all -dir ../../../pkg/fswatcher
diff --git a/cmd/query/app/ui/assets_test.go b/cmd/query/app/ui/assets_test.go
index 4b61ee80..ad6bba15 100644
--- a/cmd/query/app/ui/assets_test.go
+++ b/cmd/query/app/ui/assets_test.go
@@ -11,7 +11,7 @@ import (
 	"github.com/stretchr/testify/require"
 
 	"github.com/jaegertracing/jaeger/cmd/query/app/ui/testdata"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestGetStaticFiles_ReturnsPlaceholderWhenActualNotPresent(t *testing.T) {
diff --git a/cmd/query/app/ui/empty_test.go b/cmd/query/app/ui/empty_test.go
index 02d1d90f..d347c89e 100644
--- a/cmd/query/app/ui/empty_test.go
+++ b/cmd/query/app/ui/empty_test.go
@@ -6,7 +6,7 @@ package ui
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/query/app/ui/testdata/empty_test.go b/cmd/query/app/ui/testdata/empty_test.go
index eee5f94c..87242d3b 100644
--- a/cmd/query/app/ui/testdata/empty_test.go
+++ b/cmd/query/app/ui/testdata/empty_test.go
@@ -6,7 +6,7 @@ package testdata
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/cmd/remote-storage/app/package_test.go b/cmd/remote-storage/app/package_test.go
index 5946e183..4a633786 100644
--- a/cmd/remote-storage/app/package_test.go
+++ b/cmd/remote-storage/app/package_test.go
@@ -6,7 +6,7 @@ package app
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/crossdock/services/pakcage_test.go b/crossdock/services/pakcage_test.go
index f50a71f6..170826c2 100644
--- a/crossdock/services/pakcage_test.go
+++ b/crossdock/services/pakcage_test.go
@@ -6,7 +6,7 @@ package services
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/empty_test.go b/empty_test.go
index eb3086e3..b2acf5ff 100644
--- a/empty_test.go
+++ b/empty_test.go
@@ -6,7 +6,7 @@ package jaeger
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestDummy(*testing.T) {
diff --git a/examples/hotrod/cmd/empty_test.go b/examples/hotrod/cmd/empty_test.go
index ca1203e5..bc3dd168 100644
--- a/examples/hotrod/cmd/empty_test.go
+++ b/examples/hotrod/cmd/empty_test.go
@@ -6,7 +6,7 @@ package cmd
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/delay/empty_test.go b/examples/hotrod/pkg/delay/empty_test.go
index 1a30d4b0..48a8a26e 100644
--- a/examples/hotrod/pkg/delay/empty_test.go
+++ b/examples/hotrod/pkg/delay/empty_test.go
@@ -6,7 +6,7 @@ package delay
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/httperr/empty_test.go b/examples/hotrod/pkg/httperr/empty_test.go
index 0de2af58..56a60a19 100644
--- a/examples/hotrod/pkg/httperr/empty_test.go
+++ b/examples/hotrod/pkg/httperr/empty_test.go
@@ -6,7 +6,7 @@ package httperr
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/log/empty_test.go b/examples/hotrod/pkg/log/empty_test.go
index 789d068d..94a1edee 100644
--- a/examples/hotrod/pkg/log/empty_test.go
+++ b/examples/hotrod/pkg/log/empty_test.go
@@ -6,7 +6,7 @@ package log
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/pool/empty_test.go b/examples/hotrod/pkg/pool/empty_test.go
index cef43556..3c5dc986 100644
--- a/examples/hotrod/pkg/pool/empty_test.go
+++ b/examples/hotrod/pkg/pool/empty_test.go
@@ -6,7 +6,7 @@ package pool
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/tracing/empty_test.go b/examples/hotrod/pkg/tracing/empty_test.go
index f4fd2013..0d1704c3 100644
--- a/examples/hotrod/pkg/tracing/empty_test.go
+++ b/examples/hotrod/pkg/tracing/empty_test.go
@@ -6,7 +6,7 @@ package tracing
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/pkg/tracing/rpcmetrics/package_test.go b/examples/hotrod/pkg/tracing/rpcmetrics/package_test.go
index 83ea8a86..5c0286b1 100644
--- a/examples/hotrod/pkg/tracing/rpcmetrics/package_test.go
+++ b/examples/hotrod/pkg/tracing/rpcmetrics/package_test.go
@@ -6,7 +6,7 @@ package rpcmetrics
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/services/config/empty_test.go b/examples/hotrod/services/config/empty_test.go
index 98fdf564..0e4ba375 100644
--- a/examples/hotrod/services/config/empty_test.go
+++ b/examples/hotrod/services/config/empty_test.go
@@ -6,7 +6,7 @@ package config
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/services/customer/empty_test.go b/examples/hotrod/services/customer/empty_test.go
index 5b94c10c..16e0afab 100644
--- a/examples/hotrod/services/customer/empty_test.go
+++ b/examples/hotrod/services/customer/empty_test.go
@@ -6,7 +6,7 @@ package customer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/services/driver/empty_test.go b/examples/hotrod/services/driver/empty_test.go
index c03c9fbd..259d2ed3 100644
--- a/examples/hotrod/services/driver/empty_test.go
+++ b/examples/hotrod/services/driver/empty_test.go
@@ -6,7 +6,7 @@ package driver
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/services/frontend/empty_test.go b/examples/hotrod/services/frontend/empty_test.go
index 65ed85be..ea512ba5 100644
--- a/examples/hotrod/services/frontend/empty_test.go
+++ b/examples/hotrod/services/frontend/empty_test.go
@@ -6,7 +6,7 @@ package frontend
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/examples/hotrod/services/route/empty_test.go b/examples/hotrod/services/route/empty_test.go
index 3fad1af8..eb6294e1 100644
--- a/examples/hotrod/services/route/empty_test.go
+++ b/examples/hotrod/services/route/empty_test.go
@@ -6,7 +6,7 @@ package route
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/cache/lru_test.go b/internal/cache/lru_test.go
index 9d45917b..12daa838 100644
--- a/internal/cache/lru_test.go
+++ b/internal/cache/lru_test.go
@@ -11,7 +11,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestLRU(t *testing.T) {
diff --git a/internal/grpctest/reflection_test.go b/internal/grpctest/reflection_test.go
index 8bb7558f..158be231 100644
--- a/internal/grpctest/reflection_test.go
+++ b/internal/grpctest/reflection_test.go
@@ -12,7 +12,7 @@ import (
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/reflection"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestReflectionServiceValidator(t *testing.T) {
diff --git a/internal/jaegerclientenv2otel/envvars_test.go b/internal/jaegerclientenv2otel/envvars_test.go
index ec1ac656..e4e095b5 100644
--- a/internal/jaegerclientenv2otel/envvars_test.go
+++ b/internal/jaegerclientenv2otel/envvars_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMapJaegerToOtelEnvVars(t *testing.T) {
diff --git a/internal/jiter/package_test.go b/internal/jiter/package_test.go
index f6956d2d..12578671 100644
--- a/internal/jiter/package_test.go
+++ b/internal/jiter/package_test.go
@@ -6,7 +6,7 @@ package jiter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/jptrace/package_test.go b/internal/jptrace/package_test.go
index c86c58d3..3426b218 100644
--- a/internal/jptrace/package_test.go
+++ b/internal/jptrace/package_test.go
@@ -6,7 +6,7 @@ package jptrace
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/leaderelection/leader_election_test.go b/internal/leaderelection/leader_election_test.go
index 98fc3241..2c74c930 100644
--- a/internal/leaderelection/leader_election_test.go
+++ b/internal/leaderelection/leader_election_test.go
@@ -13,8 +13,8 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	lmocks "github.com/jaegertracing/jaeger/pkg/distributedlock/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var errTestLock = errors.New("lock error")
diff --git a/internal/metrics/benchmark_test.go b/internal/metrics/benchmark_test.go
index 62c322c0..37b33af3 100644
--- a/internal/metrics/benchmark_test.go
+++ b/internal/metrics/benchmark_test.go
@@ -13,8 +13,8 @@ import (
 
 	"github.com/jaegertracing/jaeger/internal/metrics/otelmetrics"
 	prom "github.com/jaegertracing/jaeger/internal/metrics/prometheus"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/metrics/metricsbuilder/builder_test.go b/internal/metrics/metricsbuilder/builder_test.go
index f20e19a3..1c23cf81 100644
--- a/internal/metrics/metricsbuilder/builder_test.go
+++ b/internal/metrics/metricsbuilder/builder_test.go
@@ -14,8 +14,8 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestAddFlags(t *testing.T) {
diff --git a/internal/metrics/otelmetrics/factory_test.go b/internal/metrics/otelmetrics/factory_test.go
index 78c24514..c4cf468a 100644
--- a/internal/metrics/otelmetrics/factory_test.go
+++ b/internal/metrics/otelmetrics/factory_test.go
@@ -15,8 +15,8 @@ import (
 	sdkmetric "go.opentelemetry.io/otel/sdk/metric"
 
 	"github.com/jaegertracing/jaeger/internal/metrics/otelmetrics"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/metrics/prometheus/factory_test.go b/internal/metrics/prometheus/factory_test.go
index e4531d12..1926363b 100644
--- a/internal/metrics/prometheus/factory_test.go
+++ b/internal/metrics/prometheus/factory_test.go
@@ -13,8 +13,8 @@ import (
 	"github.com/stretchr/testify/require"
 
 	promMetrics "github.com/jaegertracing/jaeger/internal/metrics/prometheus"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestOptions(t *testing.T) {
diff --git a/internal/metricstest/package_test.go b/internal/metricstest/package_test.go
index 17c1c2d7..0cf1d993 100644
--- a/internal/metricstest/package_test.go
+++ b/internal/metricstest/package_test.go
@@ -6,7 +6,7 @@ package metricstest
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/safeexpvar/safeexpvar_test.go b/internal/safeexpvar/safeexpvar_test.go
index 991defa8..7510eb3d 100644
--- a/internal/safeexpvar/safeexpvar_test.go
+++ b/internal/safeexpvar/safeexpvar_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestSetInt(t *testing.T) {
diff --git a/internal/sampling/grpc/grpc_handler_test.go b/internal/sampling/grpc/grpc_handler_test.go
index 1a7897d2..c15a7cb6 100644
--- a/internal/sampling/grpc/grpc_handler_test.go
+++ b/internal/sampling/grpc/grpc_handler_test.go
@@ -12,7 +12,7 @@ import (
 	"golang.org/x/net/context"
 
 	"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 type mockSamplingStore struct{}
diff --git a/internal/sampling/http/package_test.go b/internal/sampling/http/package_test.go
index 4ba7e9ac..5be2da77 100644
--- a/internal/sampling/http/package_test.go
+++ b/internal/sampling/http/package_test.go
@@ -6,7 +6,7 @@ package http
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/sampling/samplingstrategy/adaptive/calculationstrategy/package_test.go b/internal/sampling/samplingstrategy/adaptive/calculationstrategy/package_test.go
index 18a80014..fc020574 100644
--- a/internal/sampling/samplingstrategy/adaptive/calculationstrategy/package_test.go
+++ b/internal/sampling/samplingstrategy/adaptive/calculationstrategy/package_test.go
@@ -6,7 +6,7 @@ package calculationstrategy
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/sampling/samplingstrategy/adaptive/package_test.go b/internal/sampling/samplingstrategy/adaptive/package_test.go
index 64db46d1..44c8e797 100644
--- a/internal/sampling/samplingstrategy/adaptive/package_test.go
+++ b/internal/sampling/samplingstrategy/adaptive/package_test.go
@@ -6,7 +6,7 @@ package adaptive
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/sampling/samplingstrategy/adaptive/post_aggregator_test.go b/internal/sampling/samplingstrategy/adaptive/post_aggregator_test.go
index 276c9a57..0bf6f025 100644
--- a/internal/sampling/samplingstrategy/adaptive/post_aggregator_test.go
+++ b/internal/sampling/samplingstrategy/adaptive/post_aggregator_test.go
@@ -19,8 +19,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/sampling/samplingstrategy/adaptive/calculationstrategy"
 	smocks "github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/mocks"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/model"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func testThroughputs() []*model.Throughput {
diff --git a/internal/sampling/samplingstrategy/empty_test.go b/internal/sampling/samplingstrategy/empty_test.go
index 846e203d..ec3c11ef 100644
--- a/internal/sampling/samplingstrategy/empty_test.go
+++ b/internal/sampling/samplingstrategy/empty_test.go
@@ -6,7 +6,7 @@ package samplingstrategy
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/sampling/samplingstrategy/file/package_test.go b/internal/sampling/samplingstrategy/file/package_test.go
index 420b5b9f..22616b65 100644
--- a/internal/sampling/samplingstrategy/file/package_test.go
+++ b/internal/sampling/samplingstrategy/file/package_test.go
@@ -6,7 +6,7 @@ package file
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/sampling/samplingstrategy/file/provider_test.go b/internal/sampling/samplingstrategy/file/provider_test.go
index 2811a087..d2860988 100644
--- a/internal/sampling/samplingstrategy/file/provider_test.go
+++ b/internal/sampling/samplingstrategy/file/provider_test.go
@@ -22,7 +22,7 @@ import (
 	"go.uber.org/zap/zaptest/observer"
 
 	"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 const snapshotLocation = "./fixtures/"
diff --git a/internal/sampling/samplingstrategy/metafactory/package_test.go b/internal/sampling/samplingstrategy/metafactory/package_test.go
index 4e8a8d0b..6bed4f32 100644
--- a/internal/sampling/samplingstrategy/metafactory/package_test.go
+++ b/internal/sampling/samplingstrategy/metafactory/package_test.go
@@ -6,7 +6,7 @@ package metafactory
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/distributedlock/cassandra/lock_test.go b/internal/storage/distributedlock/cassandra/lock_test.go
index aa4bcfbf..61e34fca 100644
--- a/internal/storage/distributedlock/cassandra/lock_test.go
+++ b/internal/storage/distributedlock/cassandra/lock_test.go
@@ -14,8 +14,8 @@ import (
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/require"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var (
diff --git a/internal/storage/integration/badgerstore_test.go b/internal/storage/integration/badgerstore_test.go
index 9d72999f..ccc1622a 100644
--- a/internal/storage/integration/badgerstore_test.go
+++ b/internal/storage/integration/badgerstore_test.go
@@ -13,8 +13,8 @@ import (
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/badger"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type BadgerIntegrationStorage struct {
diff --git a/internal/storage/integration/cassandra_test.go b/internal/storage/integration/cassandra_test.go
index 17e931a1..4663e9f9 100644
--- a/internal/storage/integration/cassandra_test.go
+++ b/internal/storage/integration/cassandra_test.go
@@ -17,9 +17,9 @@ import (
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/dependencystore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/cassandra"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type CassandraStorageIntegration struct {
diff --git a/internal/storage/integration/elasticsearch_test.go b/internal/storage/integration/elasticsearch_test.go
index 5c1623c3..1aa04bb6 100644
--- a/internal/storage/integration/elasticsearch_test.go
+++ b/internal/storage/integration/elasticsearch_test.go
@@ -26,9 +26,9 @@ import (
 	es "github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const (
diff --git a/internal/storage/integration/es_index_cleaner_test.go b/internal/storage/integration/es_index_cleaner_test.go
index 3dd7e83d..461778c2 100644
--- a/internal/storage/integration/es_index_cleaner_test.go
+++ b/internal/storage/integration/es_index_cleaner_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 const (
diff --git a/internal/storage/integration/es_index_rollover_test.go b/internal/storage/integration/es_index_rollover_test.go
index c85e0106..fab75736 100644
--- a/internal/storage/integration/es_index_rollover_test.go
+++ b/internal/storage/integration/es_index_rollover_test.go
@@ -12,7 +12,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 const (
diff --git a/internal/storage/integration/grpc_test.go b/internal/storage/integration/grpc_test.go
index eb653d15..8a5b31e9 100644
--- a/internal/storage/integration/grpc_test.go
+++ b/internal/storage/integration/grpc_test.go
@@ -13,9 +13,9 @@ import (
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/grpc"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 	"github.com/jaegertracing/jaeger/ports"
 )
 
diff --git a/internal/storage/integration/kafka_test.go b/internal/storage/integration/kafka_test.go
index d4e21443..a0be1db6 100644
--- a/internal/storage/integration/kafka_test.go
+++ b/internal/storage/integration/kafka_test.go
@@ -22,10 +22,10 @@ import (
 	"github.com/jaegertracing/jaeger/internal/storage/v1/kafka"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/memory"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/kafka/consumer"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const defaultLocalKafkaBroker = "127.0.0.1:9092"
diff --git a/internal/storage/integration/memstore_test.go b/internal/storage/integration/memstore_test.go
index f000c2b9..802be56b 100644
--- a/internal/storage/integration/memstore_test.go
+++ b/internal/storage/integration/memstore_test.go
@@ -11,7 +11,7 @@ import (
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/memory"
 	"github.com/jaegertracing/jaeger/internal/storage/v2/v1adapter"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 type MemStorageIntegrationTestSuite struct {
diff --git a/internal/storage/integration/package_test.go b/internal/storage/integration/package_test.go
index bf7665a5..7668c764 100644
--- a/internal/storage/integration/package_test.go
+++ b/internal/storage/integration/package_test.go
@@ -7,7 +7,7 @@ import (
 	"os"
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/metricstore/disabled/package_test.go b/internal/storage/metricstore/disabled/package_test.go
index 093208ae..4357f2d0 100644
--- a/internal/storage/metricstore/disabled/package_test.go
+++ b/internal/storage/metricstore/disabled/package_test.go
@@ -6,7 +6,7 @@ package disabled
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/metricstore/package_test.go b/internal/storage/metricstore/package_test.go
index 155d9b50..e2db1e08 100644
--- a/internal/storage/metricstore/package_test.go
+++ b/internal/storage/metricstore/package_test.go
@@ -6,7 +6,7 @@ package metricstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/metricstore/prometheus/factory_test.go b/internal/storage/metricstore/prometheus/factory_test.go
index cb79e173..d3f4ac7e 100644
--- a/internal/storage/metricstore/prometheus/factory_test.go
+++ b/internal/storage/metricstore/prometheus/factory_test.go
@@ -13,10 +13,10 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	promCfg "github.com/jaegertracing/jaeger/pkg/prometheus/config"
 	"github.com/jaegertracing/jaeger/pkg/telemetry"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var _ storage.MetricStoreFactory = new(Factory)
diff --git a/internal/storage/metricstore/prometheus/metricstore/dbmodel/to_domain_test.go b/internal/storage/metricstore/prometheus/metricstore/dbmodel/to_domain_test.go
index ddd73aef..84523948 100644
--- a/internal/storage/metricstore/prometheus/metricstore/dbmodel/to_domain_test.go
+++ b/internal/storage/metricstore/prometheus/metricstore/dbmodel/to_domain_test.go
@@ -12,7 +12,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics"
 )
 
diff --git a/internal/storage/metricstore/prometheus/metricstore/reader_test.go b/internal/storage/metricstore/prometheus/metricstore/reader_test.go
index fc08eb6e..fb4cae37 100644
--- a/internal/storage/metricstore/prometheus/metricstore/reader_test.go
+++ b/internal/storage/metricstore/prometheus/metricstore/reader_test.go
@@ -27,9 +27,9 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/metricstore"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/bearertoken"
 	"github.com/jaegertracing/jaeger/pkg/prometheus/config"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 	"github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics"
 )
 
diff --git a/internal/storage/v1/api/dependencystore/empty_test.go b/internal/storage/v1/api/dependencystore/empty_test.go
index a040382f..3ecdecfc 100644
--- a/internal/storage/v1/api/dependencystore/empty_test.go
+++ b/internal/storage/v1/api/dependencystore/empty_test.go
@@ -6,7 +6,7 @@ package dependencystore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/empty_test.go b/internal/storage/v1/api/empty_test.go
index 39c0361a..cc342903 100644
--- a/internal/storage/v1/api/empty_test.go
+++ b/internal/storage/v1/api/empty_test.go
@@ -6,7 +6,7 @@ package storage
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/metricstore/empty_test.go b/internal/storage/v1/api/metricstore/empty_test.go
index b32d4113..25b76ca6 100644
--- a/internal/storage/v1/api/metricstore/empty_test.go
+++ b/internal/storage/v1/api/metricstore/empty_test.go
@@ -6,7 +6,7 @@ package metricstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/metricstore/metricstoremetrics/decorator_test.go b/internal/storage/v1/api/metricstore/metricstoremetrics/decorator_test.go
index 0f91179f..1d866c6e 100644
--- a/internal/storage/v1/api/metricstore/metricstoremetrics/decorator_test.go
+++ b/internal/storage/v1/api/metricstore/metricstoremetrics/decorator_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/metricstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/metricstore/metricstoremetrics"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/metricstore/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	protometrics "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics"
 )
 
diff --git a/internal/storage/v1/api/samplingstore/empty_test.go b/internal/storage/v1/api/samplingstore/empty_test.go
index 3450f673..7a8c650a 100644
--- a/internal/storage/v1/api/samplingstore/empty_test.go
+++ b/internal/storage/v1/api/samplingstore/empty_test.go
@@ -6,7 +6,7 @@ package samplingstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/samplingstore/model/empty_test.go b/internal/storage/v1/api/samplingstore/model/empty_test.go
index 8465d3a7..97ec5941 100644
--- a/internal/storage/v1/api/samplingstore/model/empty_test.go
+++ b/internal/storage/v1/api/samplingstore/model/empty_test.go
@@ -6,7 +6,7 @@ package model
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/spanstore/interface_test.go b/internal/storage/v1/api/spanstore/interface_test.go
index 39377b3c..94ccbcf8 100644
--- a/internal/storage/v1/api/spanstore/interface_test.go
+++ b/internal/storage/v1/api/spanstore/interface_test.go
@@ -6,7 +6,7 @@ package spanstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/api/spanstore/spanstoremetrics/package_test.go b/internal/storage/v1/api/spanstore/spanstoremetrics/package_test.go
index df29173d..419a446b 100644
--- a/internal/storage/v1/api/spanstore/spanstoremetrics/package_test.go
+++ b/internal/storage/v1/api/spanstore/spanstoremetrics/package_test.go
@@ -6,7 +6,7 @@ package spanstoremetrics
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/badger/dependencystore/package_test.go b/internal/storage/v1/badger/dependencystore/package_test.go
index 63f0c827..073bfab1 100644
--- a/internal/storage/v1/badger/dependencystore/package_test.go
+++ b/internal/storage/v1/badger/dependencystore/package_test.go
@@ -6,7 +6,7 @@ package dependencystore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/badger/package_test.go b/internal/storage/v1/badger/package_test.go
index fe076996..a7796035 100644
--- a/internal/storage/v1/badger/package_test.go
+++ b/internal/storage/v1/badger/package_test.go
@@ -6,7 +6,7 @@ package badger
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/badger/samplingstore/storage_test.go b/internal/storage/v1/badger/samplingstore/storage_test.go
index 33d80fdd..88bb7bee 100644
--- a/internal/storage/v1/badger/samplingstore/storage_test.go
+++ b/internal/storage/v1/badger/samplingstore/storage_test.go
@@ -13,7 +13,7 @@ import (
 	"github.com/stretchr/testify/require"
 
 	samplemodel "github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/model"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func newTestSamplingStore(db *badger.DB) *SamplingStore {
diff --git a/internal/storage/v1/badger/spanstore/package_test.go b/internal/storage/v1/badger/spanstore/package_test.go
index 39377b3c..94ccbcf8 100644
--- a/internal/storage/v1/badger/spanstore/package_test.go
+++ b/internal/storage/v1/badger/spanstore/package_test.go
@@ -6,7 +6,7 @@ package spanstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/blackhole/package_test.go b/internal/storage/v1/blackhole/package_test.go
index a822ab96..408a1d24 100644
--- a/internal/storage/v1/blackhole/package_test.go
+++ b/internal/storage/v1/blackhole/package_test.go
@@ -6,7 +6,7 @@ package blackhole
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/dependencystore/package_test.go b/internal/storage/v1/cassandra/dependencystore/package_test.go
index 63f0c827..073bfab1 100644
--- a/internal/storage/v1/cassandra/dependencystore/package_test.go
+++ b/internal/storage/v1/cassandra/dependencystore/package_test.go
@@ -6,7 +6,7 @@ package dependencystore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/dependencystore/storage_test.go b/internal/storage/v1/cassandra/dependencystore/storage_test.go
index 8e4a768f..e52f1e70 100644
--- a/internal/storage/v1/cassandra/dependencystore/storage_test.go
+++ b/internal/storage/v1/cassandra/dependencystore/storage_test.go
@@ -18,10 +18,10 @@ import (
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/dependencystore"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type depStorageTest struct {
diff --git a/internal/storage/v1/cassandra/factory_test.go b/internal/storage/v1/cassandra/factory_test.go
index bc0af147..5b70e1d2 100644
--- a/internal/storage/v1/cassandra/factory_test.go
+++ b/internal/storage/v1/cassandra/factory_test.go
@@ -15,12 +15,12 @@ import (
 	"go.opentelemetry.io/collector/config/configtls"
 	"go.uber.org/zap"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/config"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
 	viperize "github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type mockSessionBuilder struct {
diff --git a/internal/storage/v1/cassandra/package_test.go b/internal/storage/v1/cassandra/package_test.go
index bc3aa3b8..cbe043fa 100644
--- a/internal/storage/v1/cassandra/package_test.go
+++ b/internal/storage/v1/cassandra/package_test.go
@@ -6,7 +6,7 @@ package cassandra
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/samplingstore/storage_test.go b/internal/storage/v1/cassandra/samplingstore/storage_test.go
index 02759b68..35703c86 100644
--- a/internal/storage/v1/cassandra/samplingstore/storage_test.go
+++ b/internal/storage/v1/cassandra/samplingstore/storage_test.go
@@ -19,8 +19,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/model"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var testTime = time.Date(2017, time.January, 24, 11, 15, 17, 12345, time.UTC)
diff --git a/internal/storage/v1/cassandra/schema/package_test.go b/internal/storage/v1/cassandra/schema/package_test.go
index 5c3adb21..194d5b2d 100644
--- a/internal/storage/v1/cassandra/schema/package_test.go
+++ b/internal/storage/v1/cassandra/schema/package_test.go
@@ -6,7 +6,7 @@ package schema
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/spanstore/dbmodel/package_test.go b/internal/storage/v1/cassandra/spanstore/dbmodel/package_test.go
index ff24b0a5..ab230ddf 100644
--- a/internal/storage/v1/cassandra/spanstore/dbmodel/package_test.go
+++ b/internal/storage/v1/cassandra/spanstore/dbmodel/package_test.go
@@ -6,7 +6,7 @@ package dbmodel
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/spanstore/operation_names_test.go b/internal/storage/v1/cassandra/spanstore/operation_names_test.go
index 9ae2728e..46a9a42c 100644
--- a/internal/storage/v1/cassandra/spanstore/operation_names_test.go
+++ b/internal/storage/v1/cassandra/spanstore/operation_names_test.go
@@ -18,8 +18,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/cassandra/spanstore/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type operationNameStorageTest struct {
diff --git a/internal/storage/v1/cassandra/spanstore/package_test.go b/internal/storage/v1/cassandra/spanstore/package_test.go
index 39377b3c..94ccbcf8 100644
--- a/internal/storage/v1/cassandra/spanstore/package_test.go
+++ b/internal/storage/v1/cassandra/spanstore/package_test.go
@@ -6,7 +6,7 @@ package spanstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/cassandra/spanstore/reader_test.go b/internal/storage/v1/cassandra/spanstore/reader_test.go
index 3651f2f0..c386b724 100644
--- a/internal/storage/v1/cassandra/spanstore/reader_test.go
+++ b/internal/storage/v1/cassandra/spanstore/reader_test.go
@@ -23,9 +23,9 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/cassandra/spanstore/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type spanReaderTest struct {
diff --git a/internal/storage/v1/cassandra/spanstore/service_names_test.go b/internal/storage/v1/cassandra/spanstore/service_names_test.go
index d0cb4968..6d126e41 100644
--- a/internal/storage/v1/cassandra/spanstore/service_names_test.go
+++ b/internal/storage/v1/cassandra/spanstore/service_names_test.go
@@ -16,8 +16,8 @@ import (
 	"go.uber.org/zap"
 
 	"github.com/jaegertracing/jaeger/internal/metricstest"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type serviceNameStorageTest struct {
diff --git a/internal/storage/v1/cassandra/spanstore/writer_test.go b/internal/storage/v1/cassandra/spanstore/writer_test.go
index fc55a1c7..02526d53 100644
--- a/internal/storage/v1/cassandra/spanstore/writer_test.go
+++ b/internal/storage/v1/cassandra/spanstore/writer_test.go
@@ -22,8 +22,8 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/cassandra/spanstore/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/cassandra/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type spanWriterTest struct {
diff --git a/internal/storage/v1/elasticsearch/dependencystore/dbmodel/converter_test.go b/internal/storage/v1/elasticsearch/dependencystore/dbmodel/converter_test.go
index 94257c1f..5564e97c 100644
--- a/internal/storage/v1/elasticsearch/dependencystore/dbmodel/converter_test.go
+++ b/internal/storage/v1/elasticsearch/dependencystore/dbmodel/converter_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	"github.com/jaegertracing/jaeger-idl/model/v1"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestConvertDependencies(t *testing.T) {
diff --git a/internal/storage/v1/elasticsearch/dependencystore/storage_test.go b/internal/storage/v1/elasticsearch/dependencystore/storage_test.go
index f16865c8..be7465ab 100644
--- a/internal/storage/v1/elasticsearch/dependencystore/storage_test.go
+++ b/internal/storage/v1/elasticsearch/dependencystore/storage_test.go
@@ -20,10 +20,10 @@ import (
 
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/dependencystore"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	"github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const defaultMaxDocCount = 10_000
diff --git a/internal/storage/v1/elasticsearch/factory_test.go b/internal/storage/v1/elasticsearch/factory_test.go
index 2f4b288c..2f85b067 100644
--- a/internal/storage/v1/elasticsearch/factory_test.go
+++ b/internal/storage/v1/elasticsearch/factory_test.go
@@ -25,12 +25,12 @@ import (
 
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	escfg "github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var mockEsServerResponse = []byte(`
diff --git a/internal/storage/v1/elasticsearch/mappings/mapping_test.go b/internal/storage/v1/elasticsearch/mappings/mapping_test.go
index f7032253..915f51a4 100644
--- a/internal/storage/v1/elasticsearch/mappings/mapping_test.go
+++ b/internal/storage/v1/elasticsearch/mappings/mapping_test.go
@@ -16,10 +16,10 @@ import (
 	"github.com/stretchr/testify/mock"
 	"github.com/stretchr/testify/require"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	"github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 //go:embed fixtures/*.json
diff --git a/internal/storage/v1/elasticsearch/package_test.go b/internal/storage/v1/elasticsearch/package_test.go
index 788df018..97c5c71b 100644
--- a/internal/storage/v1/elasticsearch/package_test.go
+++ b/internal/storage/v1/elasticsearch/package_test.go
@@ -6,7 +6,7 @@ package elasticsearch
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/elasticsearch/samplingstore/dbmodel/converter_test.go b/internal/storage/v1/elasticsearch/samplingstore/dbmodel/converter_test.go
index 520eea12..db0bdb1c 100644
--- a/internal/storage/v1/elasticsearch/samplingstore/dbmodel/converter_test.go
+++ b/internal/storage/v1/elasticsearch/samplingstore/dbmodel/converter_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/model"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestConvertDependencies(t *testing.T) {
diff --git a/internal/storage/v1/elasticsearch/samplingstore/storage_test.go b/internal/storage/v1/elasticsearch/samplingstore/storage_test.go
index ec0359c4..c1718959 100644
--- a/internal/storage/v1/elasticsearch/samplingstore/storage_test.go
+++ b/internal/storage/v1/elasticsearch/samplingstore/storage_test.go
@@ -18,10 +18,10 @@ import (
 
 	samplemodel "github.com/jaegertracing/jaeger/internal/storage/v1/api/samplingstore/model"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch/samplingstore/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	"github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const defaultMaxDocCount = 10_000
diff --git a/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel/package_test.go b/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel/package_test.go
index ff24b0a5..ab230ddf 100644
--- a/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel/package_test.go
+++ b/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel/package_test.go
@@ -6,7 +6,7 @@ package dbmodel
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/elasticsearch/spanstore/package_test.go b/internal/storage/v1/elasticsearch/spanstore/package_test.go
index 39377b3c..94ccbcf8 100644
--- a/internal/storage/v1/elasticsearch/spanstore/package_test.go
+++ b/internal/storage/v1/elasticsearch/spanstore/package_test.go
@@ -6,7 +6,7 @@ package spanstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/elasticsearch/spanstore/reader_test.go b/internal/storage/v1/elasticsearch/spanstore/reader_test.go
index 91d6250b..463cab65 100644
--- a/internal/storage/v1/elasticsearch/spanstore/reader_test.go
+++ b/internal/storage/v1/elasticsearch/spanstore/reader_test.go
@@ -27,10 +27,10 @@ import (
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	"github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 const defaultMaxDocCount = 10_000
diff --git a/internal/storage/v1/elasticsearch/spanstore/writer_test.go b/internal/storage/v1/elasticsearch/spanstore/writer_test.go
index 5d841b5d..a09fc443 100644
--- a/internal/storage/v1/elasticsearch/spanstore/writer_test.go
+++ b/internal/storage/v1/elasticsearch/spanstore/writer_test.go
@@ -20,10 +20,10 @@ import (
 	"github.com/jaegertracing/jaeger/internal/metricstest"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch/spanstore/internal/dbmodel"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/es"
 	"github.com/jaegertracing/jaeger/pkg/es/config"
 	"github.com/jaegertracing/jaeger/pkg/es/mocks"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type spanWriterTest struct {
diff --git a/internal/storage/v1/factory/package_test.go b/internal/storage/v1/factory/package_test.go
index 1e5f5cd3..26e7be2e 100644
--- a/internal/storage/v1/factory/package_test.go
+++ b/internal/storage/v1/factory/package_test.go
@@ -6,7 +6,7 @@ package factory
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/grpc/package_test.go b/internal/storage/v1/grpc/package_test.go
index 93c28853..c4a6e49f 100644
--- a/internal/storage/v1/grpc/package_test.go
+++ b/internal/storage/v1/grpc/package_test.go
@@ -6,7 +6,7 @@ package grpc
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/grpc/proto/storage_v1/storage_test.go b/internal/storage/v1/grpc/proto/storage_v1/storage_test.go
index b8780a77..fe4a6109 100644
--- a/internal/storage/v1/grpc/proto/storage_v1/storage_test.go
+++ b/internal/storage/v1/grpc/proto/storage_v1/storage_test.go
@@ -14,7 +14,7 @@ import (
 
 	"github.com/jaegertracing/jaeger-idl/model/v1"
 	"github.com/jaegertracing/jaeger/internal/storage/v1/grpc/proto/storageprototest"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/proto-gen/storage_v1"
 )
 
diff --git a/internal/storage/v1/grpc/shared/package_test.go b/internal/storage/v1/grpc/shared/package_test.go
index b5961019..8da08326 100644
--- a/internal/storage/v1/grpc/shared/package_test.go
+++ b/internal/storage/v1/grpc/shared/package_test.go
@@ -6,7 +6,7 @@ package shared
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/kafka/package_test.go b/internal/storage/v1/kafka/package_test.go
index 9375f344..6f56322d 100644
--- a/internal/storage/v1/kafka/package_test.go
+++ b/internal/storage/v1/kafka/package_test.go
@@ -6,7 +6,7 @@ package kafka
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/memory/package_test.go b/internal/storage/v1/memory/package_test.go
index 5bb31b12..62527445 100644
--- a/internal/storage/v1/memory/package_test.go
+++ b/internal/storage/v1/memory/package_test.go
@@ -6,7 +6,7 @@ package memory
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v1/package_test.go b/internal/storage/v1/package_test.go
index 8fb8850e..7be6ad11 100644
--- a/internal/storage/v1/package_test.go
+++ b/internal/storage/v1/package_test.go
@@ -6,7 +6,7 @@ package storage
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v2/api/depstore/package_test.go b/internal/storage/v2/api/depstore/package_test.go
index bb0d70c2..9b121029 100644
--- a/internal/storage/v2/api/depstore/package_test.go
+++ b/internal/storage/v2/api/depstore/package_test.go
@@ -6,7 +6,7 @@ package depstore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v2/api/package_test.go b/internal/storage/v2/api/package_test.go
index 1802ccdc..25ad0545 100644
--- a/internal/storage/v2/api/package_test.go
+++ b/internal/storage/v2/api/package_test.go
@@ -6,7 +6,7 @@ package storage_v2
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v2/api/tracestore/empty_test.go b/internal/storage/v2/api/tracestore/empty_test.go
index 01dd408c..7a3f9c1d 100644
--- a/internal/storage/v2/api/tracestore/empty_test.go
+++ b/internal/storage/v2/api/tracestore/empty_test.go
@@ -6,7 +6,7 @@ package tracestore
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v2/grpc/package_test.go b/internal/storage/v2/grpc/package_test.go
index 01178b6f..2d448073 100644
--- a/internal/storage/v2/grpc/package_test.go
+++ b/internal/storage/v2/grpc/package_test.go
@@ -6,7 +6,7 @@ package grpc
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/storage/v2/v1adapter/package_test.go b/internal/storage/v2/v1adapter/package_test.go
index d97d8a19..4f4c056b 100644
--- a/internal/storage/v2/v1adapter/package_test.go
+++ b/internal/storage/v2/v1adapter/package_test.go
@@ -6,7 +6,7 @@ package v1adapter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/testutils/leakcheck.go b/internal/testutils/leakcheck.go
similarity index 100%
rename from pkg/testutils/leakcheck.go
rename to internal/testutils/leakcheck.go
diff --git a/pkg/testutils/leakcheck_test.go b/internal/testutils/leakcheck_test.go
similarity index 83%
rename from pkg/testutils/leakcheck_test.go
rename to internal/testutils/leakcheck_test.go
index c9bf2fe6..22882c09 100644
--- a/pkg/testutils/leakcheck_test.go
+++ b/internal/testutils/leakcheck_test.go
@@ -6,7 +6,7 @@ package testutils_test
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestVerifyGoLeaksOnce(t *testing.T) {
diff --git a/pkg/testutils/logger.go b/internal/testutils/logger.go
similarity index 100%
rename from pkg/testutils/logger.go
rename to internal/testutils/logger.go
diff --git a/pkg/testutils/logger_test.go b/internal/testutils/logger_test.go
similarity index 100%
rename from pkg/testutils/logger_test.go
rename to internal/testutils/logger_test.go
diff --git a/internal/tracegen/package_test.go b/internal/tracegen/package_test.go
index 527806db..44a2ba4e 100644
--- a/internal/tracegen/package_test.go
+++ b/internal/tracegen/package_test.go
@@ -6,7 +6,7 @@ package tracegen
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/internal/tracegen/worker_test.go b/internal/tracegen/worker_test.go
index 557e8060..af2adb4f 100644
--- a/internal/tracegen/worker_test.go
+++ b/internal/tracegen/worker_test.go
@@ -12,7 +12,7 @@ import (
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
 	"go.opentelemetry.io/otel/trace"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func Test_SimulateTraces(t *testing.T) {
diff --git a/model/adjuster/package_test.go b/model/adjuster/package_test.go
index 57ec3af2..431197da 100644
--- a/model/adjuster/package_test.go
+++ b/model/adjuster/package_test.go
@@ -6,7 +6,7 @@ package adjuster
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/model/converter/empty_test.go b/model/converter/empty_test.go
index 5c25fb66..5fe3e963 100644
--- a/model/converter/empty_test.go
+++ b/model/converter/empty_test.go
@@ -6,7 +6,7 @@ package converter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestDummy(*testing.T) {
diff --git a/model/converter/json/package_test.go b/model/converter/json/package_test.go
index 383266e8..0c8f45d6 100644
--- a/model/converter/json/package_test.go
+++ b/model/converter/json/package_test.go
@@ -6,7 +6,7 @@ package json
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/model/converter/thrift/empty_test.go b/model/converter/thrift/empty_test.go
index 2cb7fe43..20bafbcb 100644
--- a/model/converter/thrift/empty_test.go
+++ b/model/converter/thrift/empty_test.go
@@ -6,7 +6,7 @@ package thrift
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestDummy(*testing.T) {
diff --git a/model/converter/thrift/jaeger/package_test.go b/model/converter/thrift/jaeger/package_test.go
index 7cc26112..c1d12049 100644
--- a/model/converter/thrift/jaeger/package_test.go
+++ b/model/converter/thrift/jaeger/package_test.go
@@ -6,7 +6,7 @@ package jaeger
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/model/converter/thrift/zipkin/package_test.go b/model/converter/thrift/zipkin/package_test.go
index 20cc22d5..84896032 100644
--- a/model/converter/thrift/zipkin/package_test.go
+++ b/model/converter/thrift/zipkin/package_test.go
@@ -6,7 +6,7 @@ package zipkin
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/model/json/empty_test.go b/model/json/empty_test.go
index cbfaed8b..4789345e 100644
--- a/model/json/empty_test.go
+++ b/model/json/empty_test.go
@@ -6,7 +6,7 @@ package json
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/model/package_test.go b/model/package_test.go
index bd381281..99ed14e9 100644
--- a/model/package_test.go
+++ b/model/package_test.go
@@ -6,7 +6,7 @@ package model
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/bearertoken/package_test.go b/pkg/bearertoken/package_test.go
index eea2783f..402cf369 100644
--- a/pkg/bearertoken/package_test.go
+++ b/pkg/bearertoken/package_test.go
@@ -6,7 +6,7 @@ package bearertoken
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/cassandra/config/package_test.go b/pkg/cassandra/config/package_test.go
index 23624e53..df1febdd 100644
--- a/pkg/cassandra/config/package_test.go
+++ b/pkg/cassandra/config/package_test.go
@@ -6,7 +6,7 @@ package config
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/cassandra/empty_test.go b/pkg/cassandra/empty_test.go
index 762f1db3..b1a9e253 100644
--- a/pkg/cassandra/empty_test.go
+++ b/pkg/cassandra/empty_test.go
@@ -6,7 +6,7 @@ package cassandra
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/cassandra/gocql/empty_test.go b/pkg/cassandra/gocql/empty_test.go
index c6532294..5d63089c 100644
--- a/pkg/cassandra/gocql/empty_test.go
+++ b/pkg/cassandra/gocql/empty_test.go
@@ -6,7 +6,7 @@ package gocql
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/cassandra/gocql/testutils/udt_test.go b/pkg/cassandra/gocql/testutils/udt_test.go
index fcb2bac1..f97ff0fb 100644
--- a/pkg/cassandra/gocql/testutils/udt_test.go
+++ b/pkg/cassandra/gocql/testutils/udt_test.go
@@ -8,8 +8,8 @@ import (
 
 	"github.com/gocql/gocql"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	gocqlutils "github.com/jaegertracing/jaeger/pkg/cassandra/gocql/testutils"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 // CustomUDT is a custom type that implements gocql.UDTMarshaler and gocql.UDTUnmarshaler interfaces.
diff --git a/pkg/cassandra/metrics/table_test.go b/pkg/cassandra/metrics/table_test.go
index c82c99e2..13ff60a8 100644
--- a/pkg/cassandra/metrics/table_test.go
+++ b/pkg/cassandra/metrics/table_test.go
@@ -13,7 +13,7 @@ import (
 	"github.com/stretchr/testify/require"
 
 	"github.com/jaegertracing/jaeger/internal/metricstest"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestTableEmit(t *testing.T) {
diff --git a/pkg/config/corscfg/flags_test.go b/pkg/config/corscfg/flags_test.go
index 2ca108b6..b09e0b35 100644
--- a/pkg/config/corscfg/flags_test.go
+++ b/pkg/config/corscfg/flags_test.go
@@ -11,8 +11,8 @@ import (
 	"github.com/stretchr/testify/require"
 	"go.opentelemetry.io/collector/config/confighttp"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/config"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestCORSFlags(t *testing.T) {
diff --git a/pkg/config/package_test.go b/pkg/config/package_test.go
index 23624e53..df1febdd 100644
--- a/pkg/config/package_test.go
+++ b/pkg/config/package_test.go
@@ -6,7 +6,7 @@ package config
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/config/tlscfg/package_test.go b/pkg/config/tlscfg/package_test.go
index 988add71..707fdfc1 100644
--- a/pkg/config/tlscfg/package_test.go
+++ b/pkg/config/tlscfg/package_test.go
@@ -6,7 +6,7 @@ package tlscfg
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/discovery/grpcresolver/grpc_resolver_test.go b/pkg/discovery/grpcresolver/grpc_resolver_test.go
index b5c5ecd0..add98b73 100644
--- a/pkg/discovery/grpcresolver/grpc_resolver_test.go
+++ b/pkg/discovery/grpcresolver/grpc_resolver_test.go
@@ -20,8 +20,8 @@ import (
 	"google.golang.org/grpc/peer"
 	"google.golang.org/grpc/resolver"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/discovery"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 type testServer struct {
diff --git a/pkg/discovery/package_test.go b/pkg/discovery/package_test.go
index 997ef2ad..d54c63e1 100644
--- a/pkg/discovery/package_test.go
+++ b/pkg/discovery/package_test.go
@@ -6,7 +6,7 @@ package discovery
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/distributedlock/empty_test.go b/pkg/distributedlock/empty_test.go
index 1a688e65..a6b705a5 100644
--- a/pkg/distributedlock/empty_test.go
+++ b/pkg/distributedlock/empty_test.go
@@ -6,7 +6,7 @@ package distributedlock
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/empty_test.go b/pkg/empty_test.go
index 14131a1f..d3b6116a 100644
--- a/pkg/empty_test.go
+++ b/pkg/empty_test.go
@@ -6,7 +6,7 @@ package pkg
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestDummy(*testing.T) {
diff --git a/pkg/es/client/package_test.go b/pkg/es/client/package_test.go
index 527ee7a7..bc2a89f9 100644
--- a/pkg/es/client/package_test.go
+++ b/pkg/es/client/package_test.go
@@ -6,7 +6,7 @@ package client
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/es/config/config_test.go b/pkg/es/config/config_test.go
index c295d37b..944abef2 100644
--- a/pkg/es/config/config_test.go
+++ b/pkg/es/config/config_test.go
@@ -16,8 +16,8 @@ import (
 	"go.opentelemetry.io/collector/config/configtls"
 	"go.uber.org/zap"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 var mockEsServerResponseWithVersion0 = []byte(`
diff --git a/pkg/es/empty_test.go b/pkg/es/empty_test.go
index b1dfdd5a..62bcfb56 100644
--- a/pkg/es/empty_test.go
+++ b/pkg/es/empty_test.go
@@ -6,7 +6,7 @@ package es
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/es/filter/package_test.go b/pkg/es/filter/package_test.go
index 8c1748ba..09f2306e 100644
--- a/pkg/es/filter/package_test.go
+++ b/pkg/es/filter/package_test.go
@@ -6,7 +6,7 @@ package filter
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/es/wrapper/empty_test.go b/pkg/es/wrapper/empty_test.go
index 583520e8..a70b3ebc 100644
--- a/pkg/es/wrapper/empty_test.go
+++ b/pkg/es/wrapper/empty_test.go
@@ -6,7 +6,7 @@ package eswrapper
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/fswatcher/fswatcher_test.go b/pkg/fswatcher/fswatcher_test.go
index 9d7dbd35..0599055f 100644
--- a/pkg/fswatcher/fswatcher_test.go
+++ b/pkg/fswatcher/fswatcher_test.go
@@ -16,7 +16,7 @@ import (
 	"go.uber.org/zap/zapcore"
 	"go.uber.org/zap/zaptest/observer"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func createTestFiles(t *testing.T) (file1 string, file2 string, file3 string) {
diff --git a/pkg/gogocodec/codec_test.go b/pkg/gogocodec/codec_test.go
index 0c4bf50e..4603723c 100644
--- a/pkg/gogocodec/codec_test.go
+++ b/pkg/gogocodec/codec_test.go
@@ -17,7 +17,7 @@ import (
 	"google.golang.org/protobuf/types/known/timestamppb"
 
 	"github.com/jaegertracing/jaeger-idl/model/v1"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestCodecMarshallAndUnmarshall_jaeger_type(t *testing.T) {
diff --git a/pkg/gzipfs/gzip_test.go b/pkg/gzipfs/gzip_test.go
index 33a5b2ec..90a6a0cf 100644
--- a/pkg/gzipfs/gzip_test.go
+++ b/pkg/gzipfs/gzip_test.go
@@ -14,7 +14,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 //go:embed testdata
diff --git a/pkg/healthcheck/handler_test.go b/pkg/healthcheck/handler_test.go
index 399db08d..8c791e99 100644
--- a/pkg/healthcheck/handler_test.go
+++ b/pkg/healthcheck/handler_test.go
@@ -11,8 +11,8 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/healthcheck"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestStatusString(t *testing.T) {
diff --git a/pkg/healthcheck/package_test.go b/pkg/healthcheck/package_test.go
index 04133aa6..e3b2aaa6 100644
--- a/pkg/healthcheck/package_test.go
+++ b/pkg/healthcheck/package_test.go
@@ -6,7 +6,7 @@ package healthcheck
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/hostname/hostname_test.go b/pkg/hostname/hostname_test.go
index 6b6b81eb..5331ffa8 100644
--- a/pkg/hostname/hostname_test.go
+++ b/pkg/hostname/hostname_test.go
@@ -11,7 +11,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestAsIdentifier(t *testing.T) {
diff --git a/pkg/httpfs/prefixed_test.go b/pkg/httpfs/prefixed_test.go
index 25f2a0d4..59b9ef51 100644
--- a/pkg/httpfs/prefixed_test.go
+++ b/pkg/httpfs/prefixed_test.go
@@ -10,7 +10,7 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 //go:embed test_assets/*
diff --git a/pkg/httpmetrics/metrics_test.go b/pkg/httpmetrics/metrics_test.go
index 9c62b36c..b3759a57 100644
--- a/pkg/httpmetrics/metrics_test.go
+++ b/pkg/httpmetrics/metrics_test.go
@@ -15,8 +15,8 @@ import (
 
 	"github.com/jaegertracing/jaeger/internal/metrics/prometheus"
 	"github.com/jaegertracing/jaeger/internal/metricstest"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestNewMetricsHandler(t *testing.T) {
diff --git a/pkg/jtracer/jtracer_test.go b/pkg/jtracer/jtracer_test.go
index 0af70c0e..38bc7d60 100644
--- a/pkg/jtracer/jtracer_test.go
+++ b/pkg/jtracer/jtracer_test.go
@@ -12,7 +12,7 @@ import (
 	"go.opentelemetry.io/otel/sdk/resource"
 	sdktrace "go.opentelemetry.io/otel/sdk/trace"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestNew(t *testing.T) {
diff --git a/pkg/kafka/auth/empty_test.go b/pkg/kafka/auth/empty_test.go
index 47b23504..a0e5296d 100644
--- a/pkg/kafka/auth/empty_test.go
+++ b/pkg/kafka/auth/empty_test.go
@@ -6,7 +6,7 @@ package auth
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/kafka/consumer/empty_test.go b/pkg/kafka/consumer/empty_test.go
index 14e90a3a..d9f07771 100644
--- a/pkg/kafka/consumer/empty_test.go
+++ b/pkg/kafka/consumer/empty_test.go
@@ -6,7 +6,7 @@ package consumer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/kafka/producer/empty_test.go b/pkg/kafka/producer/empty_test.go
index 16dd78b1..aad004da 100644
--- a/pkg/kafka/producer/empty_test.go
+++ b/pkg/kafka/producer/empty_test.go
@@ -6,7 +6,7 @@ package producer
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/metrics/metrics_test.go b/pkg/metrics/metrics_test.go
index 03000d88..ef0fe78e 100644
--- a/pkg/metrics/metrics_test.go
+++ b/pkg/metrics/metrics_test.go
@@ -12,8 +12,8 @@ import (
 	"github.com/stretchr/testify/require"
 
 	"github.com/jaegertracing/jaeger/internal/metricstest"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestInitMetrics(t *testing.T) {
diff --git a/pkg/netutils/port_test.go b/pkg/netutils/port_test.go
index 9198f67a..256ff2aa 100644
--- a/pkg/netutils/port_test.go
+++ b/pkg/netutils/port_test.go
@@ -9,7 +9,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 type testAddr struct {
diff --git a/pkg/normalizer/service_name_test.go b/pkg/normalizer/service_name_test.go
index 2a1b3c21..63e8e2bc 100644
--- a/pkg/normalizer/service_name_test.go
+++ b/pkg/normalizer/service_name_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestServiceNameReplacer(t *testing.T) {
diff --git a/pkg/otelsemconv/empty_test.go b/pkg/otelsemconv/empty_test.go
index c172ec0a..3f9e256f 100644
--- a/pkg/otelsemconv/empty_test.go
+++ b/pkg/otelsemconv/empty_test.go
@@ -6,7 +6,7 @@ package otelsemconv
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/prometheus/config/config_test.go b/pkg/prometheus/config/config_test.go
index cdbea5a7..8945519e 100644
--- a/pkg/prometheus/config/config_test.go
+++ b/pkg/prometheus/config/config_test.go
@@ -8,7 +8,7 @@ import (
 
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestValidate(t *testing.T) {
diff --git a/pkg/queue/bounded_queue_test.go b/pkg/queue/bounded_queue_test.go
index 714b5c39..8890cd4f 100644
--- a/pkg/queue/bounded_queue_test.go
+++ b/pkg/queue/bounded_queue_test.go
@@ -16,8 +16,8 @@ import (
 	"github.com/stretchr/testify/require"
 
 	"github.com/jaegertracing/jaeger/internal/metricstest"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/metrics"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 // In this test we run a queue with capacity 1 and a single consumer.
diff --git a/pkg/recoveryhandler/zap_test.go b/pkg/recoveryhandler/zap_test.go
index bfbb009d..26107fb2 100644
--- a/pkg/recoveryhandler/zap_test.go
+++ b/pkg/recoveryhandler/zap_test.go
@@ -12,7 +12,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestNewRecoveryHandler(t *testing.T) {
diff --git a/pkg/telemetry/settings_test.go b/pkg/telemetry/settings_test.go
index 71871777..ddd560ea 100644
--- a/pkg/telemetry/settings_test.go
+++ b/pkg/telemetry/settings_test.go
@@ -15,9 +15,9 @@ import (
 	nooptrace "go.opentelemetry.io/otel/trace/noop"
 	"go.uber.org/zap"
 
+	"github.com/jaegertracing/jaeger/internal/testutils"
 	"github.com/jaegertracing/jaeger/pkg/healthcheck"
 	"github.com/jaegertracing/jaeger/pkg/telemetry"
-	"github.com/jaegertracing/jaeger/pkg/testutils"
 )
 
 func TestHCAdapter(t *testing.T) {
diff --git a/pkg/tenancy/package_test.go b/pkg/tenancy/package_test.go
index 522a8b88..27cd5874 100644
--- a/pkg/tenancy/package_test.go
+++ b/pkg/tenancy/package_test.go
@@ -6,7 +6,7 @@ package tenancy
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/pkg/version/package_test.go b/pkg/version/package_test.go
index e7331966..ecc09980 100644
--- a/pkg/version/package_test.go
+++ b/pkg/version/package_test.go
@@ -6,7 +6,7 @@ package version
 import (
 	"testing"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestMain(m *testing.M) {
diff --git a/ports/ports_test.go b/ports/ports_test.go
index 7870ebbd..0adbd5bb 100644
--- a/ports/ports_test.go
+++ b/ports/ports_test.go
@@ -8,7 +8,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 
-	"github.com/jaegertracing/jaeger/pkg/testutils"
+	"github.com/jaegertracing/jaeger/internal/testutils"
 )
 
 func TestPortToHostPort(t *testing.T) {