Skip to content

Commit

Permalink
Update jobs-service/jobs-service-common/src/test/java/org/kie/kogito/…
Browse files Browse the repository at this point in the history
…jobs/service/management/JobServiceLeaderLivenessHealthCheckTest.java

Co-authored-by: Gonzalo Muñoz <[email protected]>
  • Loading branch information
wmedvede and gmunozfe authored Sep 2, 2024
1 parent 758ebee commit 362e504
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@ void timeoutSetAndReached() {
.isNotNull()
.isEqualTo(HealthCheckResponse.Status.DOWN);
}

@Test
void statusChanged() {
healthCheck.onMessagingStatusChange(new MessagingChangeEvent(true));
doReturn(START_TIME + 1000 * 10).when(healthCheck).getCurrentTimeMillis();
HealthCheckResponse response = healthCheck.call();
assertThat(response.getStatus())
.isNotNull()
.isEqualTo(HealthCheckResponse.Status.UP);
}
}

0 comments on commit 362e504

Please sign in to comment.