Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 432edb2

Browse files
committed
* Revert docker-compose.yml changes for build.sh expectations
* Fix `verify.sh` for expectations after image run
1 parent 31db455 commit 432edb2

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

samples/kafka/docker-compose.yml

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
version: '3'
22
services:
3-
zookeeper:
4-
image: wurstmeister/zookeeper
5-
ports:
6-
- '2181:2181'
73
kafka:
84
image: wurstmeister/kafka
95
ports:
10-
- '9092:9092'
11-
depends_on:
12-
- zookeeper
6+
- "9092:9092"
137
environment:
8+
- KAFKA_ADVERTISED_HOST_NAME=127.0.0.1
9+
- KAFKA_ADVERTISED_PORT=9092
1410
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
15-
- KAFKA_ADVERTISED_HOST_NAME=kafka
16-
kafka-sample:
17-
image: kafka:0.0.1-SNAPSHOT
1811
depends_on:
19-
- kafka
12+
- zookeeper
13+
zookeeper:
14+
image: wurstmeister/zookeeper
15+
ports:
16+
- "2181:2181"
2017
environment:
21-
- SPRING_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
18+
- KAFKA_ADVERTISED_HOST_NAME=zookeeper

samples/kafka/src/main/java/com/example/kafka/KafkaApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void main(String[] args) {
2525

2626
@KafkaListener(id = "graal", topics = "graal")
2727
public void listen(Greeting in) {
28-
System.out.println("++++++Received:" + in);
28+
System.out.println("++++++Received: " + in);
2929
}
3030

3131
@Bean

samples/kafka/verify.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
sleep 2
3-
if [[ `cat target/native/test-output.txt | grep "++++++Received:foo"` ]]; then
3+
if [[ `cat target/native/test-output.txt | grep "++++++Received: Greeting{message='Hello from GraalVM!'}"` ]]; then
44
exit 0
55
else
66
exit 1

0 commit comments

Comments
 (0)