Skip to content

Commit b9f0ec5

Browse files
committed
Merge branch '2.5.x'
Closes gh-28443
2 parents 3605388 + 4d811f6 commit b9f0ec5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/client/RemoteClientConfigurationTests.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,10 +17,11 @@
1717
package org.springframework.boot.devtools.remote.client;
1818

1919
import java.io.IOException;
20+
import java.time.Duration;
2021
import java.util.HashSet;
2122
import java.util.Set;
22-
import java.util.concurrent.TimeUnit;
2323

24+
import org.awaitility.Awaitility;
2425
import org.junit.jupiter.api.AfterEach;
2526
import org.junit.jupiter.api.Test;
2627
import org.junit.jupiter.api.extension.ExtendWith;
@@ -32,7 +33,6 @@
3233
import org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher;
3334
import org.springframework.boot.devtools.filewatch.ChangedFiles;
3435
import org.springframework.boot.devtools.livereload.LiveReloadServer;
35-
import org.springframework.boot.devtools.remote.client.RemoteClientConfiguration.LiveReloadConfiguration;
3636
import org.springframework.boot.devtools.remote.server.Dispatcher;
3737
import org.springframework.boot.devtools.remote.server.DispatcherFilter;
3838
import org.springframework.boot.devtools.restart.MockRestarter;
@@ -107,11 +107,8 @@ void liveReloadOnClassPathChanged() throws Exception {
107107
Set<ChangedFiles> changeSet = new HashSet<>();
108108
ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false);
109109
this.clientContext.publishEvent(event);
110-
LiveReloadConfiguration configuration = this.clientContext.getBean(LiveReloadConfiguration.class);
111-
configuration.getExecutor().shutdown();
112-
configuration.getExecutor().awaitTermination(2, TimeUnit.SECONDS);
113110
LiveReloadServer server = this.clientContext.getBean(LiveReloadServer.class);
114-
verify(server).triggerReload();
111+
Awaitility.await().atMost(Duration.ofMinutes(1)).untilAsserted(() -> verify(server).triggerReload());
115112
}
116113

117114
@Test

0 commit comments

Comments
 (0)