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

Commit 80ff33c

Browse files
Fix flaky test.
1 parent fa503d5 commit 80ff33c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

neo4j-java-driver-spring-boot-autoconfigure/src/test/java/org/neo4j/driver/springframework/boot/autoconfigure/Neo4jDriverMetricsAutoConfigurationTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ void shouldRequireDriverWithMetrics() {
100100
contextRunner
101101
.withUserConfiguration(WithDriverWithMetrics.class, WithMeterRegistry.class)
102102
.run(ctx -> {
103+
104+
// Wait a bit to let the completable future of the test that mocks connectiviy complete.
105+
Thread.sleep(500L);
106+
103107
MeterRegistry meterRegistry = ctx.getBean(MeterRegistry.class);
104108
assertThat(meterRegistry.getMeters())
105109
.extracting(m -> m.getId().getName())

0 commit comments

Comments
 (0)