Search in sources :

Example 1 with StartupResponse

use of org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse 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();
    });
}
Also used : BufferingApplicationStartup(org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup) StartupResponse(org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse) Test(org.junit.jupiter.api.Test)

Example 2 with StartupResponse

use of org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse 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());
    });
}
Also used : BufferingApplicationStartup(org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup) StartupResponse(org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse) Test(org.junit.jupiter.api.Test)

Example 3 with StartupResponse

use of org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse 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();
    });
}
Also used : BufferingApplicationStartup(org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup) StartupResponse(org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)3 StartupResponse (org.springframework.boot.actuate.startup.StartupEndpoint.StartupResponse)3 BufferingApplicationStartup (org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup)3