Support multiple root contexts in Restarter
Update devtools restarter to support multiple application contexts. Fixes gh-7335 Closes gh-7336
This commit is contained in:
committed by
Phillip Webb
parent
9960e0d621
commit
34fb909b41
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.devtools.restart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -64,8 +66,8 @@ public class RestartApplicationListenerTests {
|
||||
assertThat(ReflectionTestUtils.getField(Restarter.getInstance(), "args"))
|
||||
.isEqualTo(ARGS);
|
||||
assertThat(Restarter.getInstance().isFinished()).isTrue();
|
||||
assertThat(ReflectionTestUtils.getField(Restarter.getInstance(), "rootContext"))
|
||||
.isNotNull();
|
||||
assertThat((List<?>) ReflectionTestUtils.getField(Restarter.getInstance(),
|
||||
"rootContexts")).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -74,8 +76,8 @@ public class RestartApplicationListenerTests {
|
||||
assertThat(ReflectionTestUtils.getField(Restarter.getInstance(), "args"))
|
||||
.isEqualTo(ARGS);
|
||||
assertThat(Restarter.getInstance().isFinished()).isTrue();
|
||||
assertThat(ReflectionTestUtils.getField(Restarter.getInstance(), "rootContext"))
|
||||
.isNull();
|
||||
assertThat((List<?>) ReflectionTestUtils.getField(Restarter.getInstance(),
|
||||
"rootContexts")).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user