Skip to content

Commit fee41d4

Browse files
author
Bojan
authored
Backend integration tests improvements (#791)
* backend: remove container names in kafka connect integration tests * backend: increase produce timeouts in deserializer integration tests
1 parent 1df2e51 commit fee41d4

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

backend/pkg/api/handle_kafka_connect_integration_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ func runConnect(network string, bootstrapServers []string) (testcontainers.Conta
258258

259259
return testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
260260
ContainerRequest: testcontainers.ContainerRequest{
261-
Name: "redpanda-connect",
262-
Image: "docker.cloudsmith.io/redpanda/connectors-unsupported/connectors:v1.0.0-e80470f",
261+
Image: "docker.cloudsmith.io/redpanda/connectors-unsupported/connectors:v1.0.0-3d7ab4d",
263262
ExposedPorts: []string{strconv.FormatInt(int64(nat.Port("8083/tcp").Int()), 10)},
264263
Env: map[string]string{
265264
"CONNECT_CONFIGURATION": testConnectConfig,
@@ -293,7 +292,6 @@ func runRedpandaForConnect(ctx context.Context, network string, plaintextKafkaPo
293292

294293
req := testcontainers.GenericContainerRequest{
295294
ContainerRequest: testcontainers.ContainerRequest{
296-
Name: "local-redpanda",
297295
Hostname: "redpanda",
298296
Networks: []string{network},
299297
NetworkAliases: map[string][]string{network: {"redpanda", "local-redpanda"}},
@@ -361,7 +359,6 @@ func runRedpandaForConnect(ctx context.Context, network string, plaintextKafkaPo
361359
func runHTTPBin(ctx context.Context, network string) (testcontainers.Container, error) {
362360
req := testcontainers.GenericContainerRequest{
363361
ContainerRequest: testcontainers.ContainerRequest{
364-
Name: "local-httpbin",
365362
Hostname: "httpbin",
366363
Networks: []string{network},
367364
NetworkAliases: map[string][]string{network: {"httpbin", "local-httpbin"}},

backend/pkg/kafka/deserializer_integration_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
169169
Timestamp: recordTimeStamp,
170170
}
171171

172-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
172+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
173173
defer produceCancel()
174174

175175
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -257,7 +257,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
257257
Timestamp: orderCreatedAt,
258258
}
259259

260-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
260+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
261261
defer produceCancel()
262262

263263
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -411,7 +411,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
411411
Timestamp: orderCreatedAt,
412412
}
413413

414-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
414+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
415415
defer produceCancel()
416416

417417
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -578,7 +578,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
578578
Timestamp: orderCreatedAt,
579579
}
580580

581-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
581+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
582582
defer produceCancel()
583583

584584
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -708,7 +708,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
708708
Topic: testTopicName,
709709
}
710710

711-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
711+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
712712
defer produceCancel()
713713

714714
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -852,7 +852,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
852852
Topic: testTopicName,
853853
}
854854

855-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
855+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
856856
defer produceCancel()
857857

858858
results := s.kafkaClient.ProduceSync(produceCtx, r)
@@ -1074,7 +1074,7 @@ func (s *KafkaIntegrationTestSuite) TestDeserializeRecord() {
10741074
Timestamp: orderCreatedAt,
10751075
}
10761076

1077-
produceCtx, produceCancel := context.WithTimeout(context.Background(), 1*time.Second)
1077+
produceCtx, produceCancel := context.WithTimeout(context.Background(), 3*time.Second)
10781078
defer produceCancel()
10791079

10801080
results := s.kafkaClient.ProduceSync(produceCtx, r)

0 commit comments

Comments
 (0)