shouldStopKeepAliveThreadIfContextIsClosed() — spring-boot Function Reference
Architecture documentation for the shouldStopKeepAliveThreadIfContextIsClosed() function in SpringApplicationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD c1564dcc_b247_32ce_3cb2_1fa780d1e05f["shouldStopKeepAliveThreadIfContextIsClosed()"] 9bd94e7f_f5c9_f923_e08b_39f195bc3614["getCurrentThreads()"] c1564dcc_b247_32ce_3cb2_1fa780d1e05f -->|calls| 9bd94e7f_f5c9_f923_e08b_39f195bc3614 9a3fc827_92a1_9230_11ce_b3ed4cf06303["close()"] c1564dcc_b247_32ce_3cb2_1fa780d1e05f -->|calls| 9a3fc827_92a1_9230_11ce_b3ed4cf06303 3613e214_49bf_015b_c43f_7f8a1274fb0b["run()"] c1564dcc_b247_32ce_3cb2_1fa780d1e05f -->|calls| 3613e214_49bf_015b_c43f_7f8a1274fb0b style c1564dcc_b247_32ce_3cb2_1fa780d1e05f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java lines 1478–1491
@Test
void shouldStopKeepAliveThreadIfContextIsClosed() {
SpringApplication application = new SpringApplication(ExampleConfig.class);
application.setWebApplicationType(WebApplicationType.NONE);
application.setKeepAlive(true);
this.context = application.run();
assertThat(getCurrentThreads()).filteredOn((thread) -> thread.getName().equals("keep-alive")).isNotEmpty();
this.context.close();
Awaitility.await()
.atMost(Duration.ofSeconds(30))
.untilAsserted(
() -> assertThat(getCurrentThreads()).filteredOn((thread) -> thread.getName().equals("keep-alive"))
.isEmpty());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does shouldStopKeepAliveThreadIfContextIsClosed() do?
shouldStopKeepAliveThreadIfContextIsClosed() is a function in the spring-boot codebase.
What does shouldStopKeepAliveThreadIfContextIsClosed() call?
shouldStopKeepAliveThreadIfContextIsClosed() calls 3 function(s): close, getCurrentThreads, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free