Skip to content

Commit

Permalink
Try to make test less likely to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Nov 28, 2024
1 parent e0199dd commit 02ef2e2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.springframework.grpc.autoconfigure.server.health;

import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import java.time.Duration;
Expand All @@ -39,8 +39,8 @@ void healthAdapterInvokedOnSchedule() {
try {
invoker.afterPropertiesSet();
Awaitility.await()
.between(Duration.ofSeconds(8), Duration.ofSeconds(10))
.untilAsserted(() -> verify(healthAdapter, times(2)).updateHealthStatus());
.between(Duration.ofSeconds(6), Duration.ofSeconds(12))
.untilAsserted(() -> verify(healthAdapter, atLeast(2)).updateHealthStatus());
}
finally {
invoker.destroy();
Expand Down

0 comments on commit 02ef2e2

Please sign in to comment.