Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Oct 22, 2024
1 parent f05b569 commit ce35234
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ const otlpPort = 4317
type E2EStorageIntegration struct {
integration.StorageIntegration

SkipStorageCleaner bool
ConfigFile string
BinaryName string
HealthCheckEndpoint string
SkipStorageCleaner bool
ConfigFile string
BinaryName string
HealthCheckPort int // overridable for Kafka tests which has two binaries and needs different ports

// EnvVarOverrides contains a map of environment variables to set.
// The key in the map is the environment variable to override and the value
Expand Down Expand Up @@ -159,10 +159,11 @@ func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) {
}

func (s *E2EStorageIntegration) doHealthCheck(t *testing.T) bool {
healthCheckEndpoint := s.HealthCheckEndpoint
if healthCheckEndpoint == "" {
healthCheckEndpoint = "http://localhost:13133/status"
healthCheckPort := s.HealthCheckPort
if healthCheckPort == 0 {
healthCheckPort = ports.CollectorV2HealthChecks
}
healthCheckEndpoint := fmt.Sprintf("http://localhost:%d/status", healthCheckPort)
t.Logf("Checking if %s is available on %s", s.BinaryName, healthCheckEndpoint)
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
Expand Down
6 changes: 3 additions & 3 deletions cmd/jaeger/internal/integration/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ func TestKafkaStorage(t *testing.T) {
t.Log("Collector initialized")

ingester := &E2EStorageIntegration{
BinaryName: "jaeger-v2-ingester",
ConfigFile: "../../config-kafka-ingester.yaml",
HealthCheckEndpoint: "http://localhost:14133/status",
BinaryName: "jaeger-v2-ingester",
ConfigFile: "../../config-kafka-ingester.yaml",
HealthCheckPort: 14133,
StorageIntegration: integration.StorageIntegration{
CleanUp: purge,
GetDependenciesReturnsSource: true,
Expand Down

0 comments on commit ce35234

Please sign in to comment.