Skip to content

Commit

Permalink
Merge pull request #29 from rexydwybrundy/no-jira-decrease-sleep-and-…
Browse files Browse the repository at this point in the history
…use-predefine-topic

feat: decrease the sleep time and use predefine topic for the test
  • Loading branch information
angelo-chan committed Sep 23, 2021
2 parents e32f05a + 0a8022d commit e43c717
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ clean:

test:
docker-compose -f docker-compose-test.yml up -d -V
sleep 50
sleep 30
go test -v ./...
docker-compose -f docker-compose-test.yml down

Expand Down
1 change: 1 addition & 0 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- KAFKA_ADVERTISED_PORT=9092
- KAFKA_ADVERTISED_HOST_NAME=localhost
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CREATE_TOPICS=prefix.testTopic:1:1
networks:
- resource-network

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- KAFKA_ADVERTISED_PORT=9092
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CREATE_TOPICS=prefix.testTopic:1:1
networks:
- resource-network

Expand Down
2 changes: 1 addition & 1 deletion kafka_integration_multiple_subscribers_ack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestMultipleSubscriptionsEventuallyProcessAllEvents(t *testing.T) {

client := createKafkaClient(t)

topicName := constructTopicTest()
topicName := preCreateTopic

var mockPayload = make(map[string]interface{})
mockPayload[testPayload] = "testPayload" // nolint:goconst
Expand Down
1 change: 1 addition & 0 deletions kafka_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
errorTimeout = "timeout while executing test"
errorPublish = "error when publish event"
errorSubscribe = "error when subscribe event"
preCreateTopic = "testTopic"
)

type Payload struct {
Expand Down

0 comments on commit e43c717

Please sign in to comment.