diff --git a/treatment-service/integration-test/fetch_treatment_it_test.go b/treatment-service/integration-test/fetch_treatment_it_test.go index 30c9c14..a110e77 100644 --- a/treatment-service/integration-test/fetch_treatment_it_test.go +++ b/treatment-service/integration-test/fetch_treatment_it_test.go @@ -401,90 +401,6 @@ func (suite *TreatmentServiceTestSuite) SetupSuite() { } fmt.Println(kafkaAddress) - //pinger, err := probing.NewPinger(pubsubEmulatorAddress) - //if err != nil { - // fmt.Println(err) - //} else { - // pinger.Count = 3 - // err = pinger.Run() // Blocks until finished. - // if err != nil { - // fmt.Println(err) - // } else { - // stats := pinger.Statistics() - // fmt.Println(stats) // get send/receive/duplicate/rtt stats - // } - //} - // - //pinger, err = probing.NewPinger(kafkaAddress) - //if err != nil { - // fmt.Println(err) - //} else { - // pinger.Count = 3 - // err = pinger.Run() // Blocks until finished. - // if err != nil { - // fmt.Println(err) - // } else { - // stats := pinger.Statistics() - // fmt.Println(stats) // get send/receive/duplicate/rtt stats - // } - //} - - // Docker compose file copied from official confluentinc repository. - // See: https://github.com/confluentinc/cp-all-in-one/blob/7.0.1-post/cp-all-in-one-kraft/docker-compose.yml - //composeFilePaths := []string{"docker-compose/kafka/docker-compose.yaml"} - //kafka, err := compose.NewDockerComposeWith(compose.WithStackFiles(composeFilePaths...), compose.StackIdentifier("kafka")) - //if err != nil { - // panic(err) - //} - //err = kafka.Up(ctx, compose.Wait(true)) - //if err != nil { - // panic(err) - //} - //fmt.Println(kafka) - //if kafka != nil { - // kafkaContainer, err := kafka.ServiceContainer(ctx, "kafka") - // if err != nil { - // panic(err) - // } - // kafkaNetworks, err := kafkaContainer.Networks(ctx) - // if err != nil { - // panic(err) - // } - // fmt.Println(kafkaNetworks) - // kafkaInfo, err := kafkaContainer.Inspect(ctx) - // if err != nil { - // panic(err) - // } - // fmt.Println(kafkaInfo.NetworkSettings.Networks) - // fmt.Println(kafkaInfo.NetworkSettings.Networks["kafka_default"]) - // fmt.Println(kafkaInfo.NetworkSettings.Networks["kafka_default"].IPAddress) - // fmt.Println(kafkaInfo.NetworkSettings.Ports) - // fmt.Println(kafkaInfo.State) - // kafkaHost, err := kafkaContainer.Host(ctx) - // if err != nil { - // panic(err) - // } - // fmt.Println(kafkaHost) - // kafkaPort, err := kafkaContainer.MappedPort(ctx, "9092") - // if err != nil { - // panic(err) - // } - // fmt.Println(kafkaPort) - // pinger, err := probing.NewPinger(fmt.Sprintf("localhost:%s", kafkaPort.Port())) - // if err != nil { - // panic(err) - // } - // pinger.Count = 3 - // err = pinger.Run() // Blocks until finished. - // if err != nil { - // panic(err) - // } - // stats := pinger.Statistics() - // fmt.Println(stats) // get send/receive/duplicate/rtt stats - // - // os.Setenv("ASSIGNEDTREATMENTLOGGER_KAFKACONFIG_BROKERS", fmt.Sprintf("localhost:%s", kafkaPort.Port())) - //} - os.Setenv("ASSIGNEDTREATMENTLOGGER_KAFKACONFIG_BROKERS", kafkaAddress) suite.kafka = kafkaContainer @@ -560,7 +476,7 @@ func (suite *TreatmentServiceTestSuite) TestAdditionalFilters() { consumer, err := kafka.NewConsumer( &kafka.ConfigMap{ - "bootstrap.servers": "localhost:9092", + "bootstrap.servers": "localhost:9093", "group.id": "test-group", "default.topic.config": kafka.ConfigMap{"auto.offset.reset": "earliest"}, })