use of org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup in project spring-boot by spring-projects.
the class StartupEndpointTests method bufferWithPostIsDrained.
@Test
void bufferWithPostIsDrained() {
BufferingApplicationStartup applicationStartup = new BufferingApplicationStartup(256);
testStartupEndpoint(applicationStartup, (startupEndpoint) -> {
StartupResponse startup = startupEndpoint.startup();
assertThat(startup.getTimeline().getEvents()).isNotEmpty();
assertThat(applicationStartup.getBufferedTimeline().getEvents()).isEmpty();
});
}
use of org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup in project spring-boot by spring-projects.
the class MyApplication method main.
public static void main(String[] args) {
SpringApplication application = new SpringApplication(MyApplication.class);
application.setApplicationStartup(new BufferingApplicationStartup(2048));
application.run(args);
}
use of org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup in project spring-boot by spring-projects.
the class StartupEndpointTests method startupEventsAreFound.
@Test
void startupEventsAreFound() {
BufferingApplicationStartup applicationStartup = new BufferingApplicationStartup(256);
testStartupEndpoint(applicationStartup, (startupEndpoint) -> {
StartupResponse startup = startupEndpoint.startup();
assertThat(startup.getSpringBootVersion()).isEqualTo(SpringBootVersion.getVersion());
assertThat(startup.getTimeline().getStartTime()).isEqualTo(applicationStartup.getBufferedTimeline().getStartTime());
});
}
use of org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup in project spring-boot by spring-projects.
the class StartupEndpointTests method bufferWithGetIsNotDrained.
@Test
void bufferWithGetIsNotDrained() {
BufferingApplicationStartup applicationStartup = new BufferingApplicationStartup(256);
testStartupEndpoint(applicationStartup, (startupEndpoint) -> {
StartupResponse startup = startupEndpoint.startupSnapshot();
assertThat(startup.getTimeline().getEvents()).isNotEmpty();
assertThat(applicationStartup.getBufferedTimeline().getEvents()).isNotEmpty();
});
}
use of org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup in project spring-boot-admin by codecentric.
the class SpringBootAdminServletApplication method main.
public static void main(String[] args) {
SpringApplication app = new SpringApplication(SpringBootAdminServletApplication.class);
app.setApplicationStartup(new BufferingApplicationStartup(1500));
app.run(args);
}
Aggregations