Skip to content

Commit

Permalink
ammend kafka tests, not to use same group.id, so consumption is done …
Browse files Browse the repository at this point in the history
…back from beginiing
  • Loading branch information
purbon committed Nov 11, 2021
1 parent 6df92ef commit 77a213a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static com.purbon.kafka.topology.CommandLineInterface.BROKERS_OPTION;
import static com.purbon.kafka.topology.Constants.JULIE_INSTANCE_ID;
import static com.purbon.kafka.topology.Constants.JULIE_KAFKA_CONSUMER_GROUP_ID;
import static org.assertj.core.api.Assertions.assertThat;

import com.purbon.kafka.topology.Configuration;
Expand Down Expand Up @@ -39,7 +40,6 @@ public void before() throws IOException {

props = new Properties();
props.put(JULIE_INSTANCE_ID, "1234");
props.put(ConsumerConfig.GROUP_ID_CONFIG, "group.id");

Map<String, Object> saslConfig =
ContainerTestUtils.getSaslConfig(
Expand Down Expand Up @@ -80,6 +80,11 @@ public void testExpectedFlow() throws IOException, InterruptedException {
backend.close();

KafkaBackend newBackend = new KafkaBackend();

HashMap<String, String> cliOps = new HashMap<>();
cliOps.put(BROKERS_OPTION, container.getBootstrapServers());
props.put(JULIE_KAFKA_CONSUMER_GROUP_ID, "julieops"+System.currentTimeMillis());
Configuration config = new Configuration(cliOps, props);
newBackend.configure(config);

Thread.sleep(3000);
Expand Down

0 comments on commit 77a213a

Please sign in to comment.