Fix assertion for outcomeWhenDevtoolsShouldBeEnabledIsTrueShouldMatch()
Closes gh-16815
This commit is contained in:
parent
4f4fe01444
commit
7aaad7e5f4
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package org.springframework.boot.devtools.autoconfigure;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -43,13 +45,15 @@ public class OnEnabledDevToolsConditionTests {
|
|||
|
||||
@Test
|
||||
public void outcomeWhenDevtoolsShouldBeEnabledIsTrueShouldMatch() throws Exception {
|
||||
AtomicBoolean containsBean = new AtomicBoolean();
|
||||
Thread thread = new Thread(() -> {
|
||||
OnEnabledDevToolsConditionTests.this.context.refresh();
|
||||
assertThat(OnEnabledDevToolsConditionTests.this.context.containsBean("test"))
|
||||
.isTrue();
|
||||
containsBean.set(
|
||||
OnEnabledDevToolsConditionTests.this.context.containsBean("test"));
|
||||
});
|
||||
thread.start();
|
||||
thread.join();
|
||||
assertThat(containsBean).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue