Skip to content

Commit

Permalink
tests: make RedisUnavailabilityTest work in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
VonDerBeck committed Nov 28, 2023
1 parent 2e421b7 commit 1c0705b
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ public void cleanUp() {
@Test
public void worksCorrectIfRedisIsTemporarilyUnavailable() throws Exception {
// given
WaitingConsumer consumer = new WaitingConsumer();
zeebeContainer.followOutput(consumer);
consumer.waitUntil(frame ->
frame.getUtf8String().contains("Successfully connected Redis exporter"), 10, TimeUnit.SECONDS);

redisConnection.close();
redisClient.shutdown();
zeebeContainer.getRedisContainer().stop();
WaitingConsumer consumer = new WaitingConsumer();
zeebeContainer.followOutput(consumer);
consumer.waitUntil(frame ->
frame.getUtf8String().contains("Connection refused: redis"), 10, TimeUnit.SECONDS);
frame.getUtf8String().contains("Cannot reconnect to [redis"), 10, TimeUnit.SECONDS);

zeebeContainer.getClient().newDeployResourceCommand().addProcessModel(WORKFLOW, "process.bpmn").send().join();
zeebeContainer.getClient().newDeployResourceCommand().addProcessModel(WORKFLOW, "process2.bpmn").send().join();
Thread.sleep(1000);
Expand Down

0 comments on commit 1c0705b

Please sign in to comment.