Skip to content

Commit 1bdf2ef

Browse files
committed
Add clarifying comments, improve messages and reuse
1 parent 94b3ecb commit 1bdf2ef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

integration-tests/redis-devservices/src/test/java/io/quarkus/redis/devservices/continuoustesting/it/DevServicesRedisContinuousTestingTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,22 @@ public void testContinuousTestingDisablesDevServicesWhenPropertiesChange() {
6363
// We could check the container goes away, but we'd have to check slowly, because ryuk can be slow
6464
}
6565

66+
// This tests behaviour in dev mode proper (rather than continuous testing)
6667
@Test
6768
public void testDevModeServiceConfigRefresh() {
6869
List<Container> started = getRedisContainers();
70+
// Interacting with the app will force a refresh
6971
ping();
7072

7173
assertFalse(started.isEmpty());
7274
Container container = started.get(0);
7375
assertTrue(Arrays.stream(container.getPorts()).noneMatch(p -> p.getPublicPort() == 6377),
74-
"Expected random port 6377, but got: " + Arrays.toString(container.getPorts()));
76+
"Expected random port, but got: " + Arrays.toString(container.getPorts()));
7577

7678
test.modifyResourceFile("application.properties",
77-
s -> ContinuousTestingTestUtils.appProperties("quarkus.redis.devservices.port=6377"));
79+
s -> ContinuousTestingTestUtils.appProperties(FIXED_PORT_PROPERTIES));
7880

81+
// Force another refresh
7982
ping();
8083
List<Container> newContainers = getRedisContainersExcludingExisting(started);
8184
assertEquals(1, newContainers.size()); // this can be wrong

0 commit comments

Comments
 (0)