diff --git a/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/server/DefaultServerInfoAppender.java b/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/server/DefaultServerInfoAppender.java index a9aa306409ecc..bb040381d9e46 100644 --- a/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/server/DefaultServerInfoAppender.java +++ b/web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/server/DefaultServerInfoAppender.java @@ -66,7 +66,6 @@ public void appendServerInfo(final Range range, final NodeList source, final Lin } final CompletableFuture[] futures = getServerGroupListFutures(range, nodes, linkDataDuplexMap); - CompletableFuture.allOf(futures).cancel(true); if (-1 == timeoutMillis) { // Returns the result value when complete CompletableFuture.allOf(futures).join(); diff --git a/web/src/test/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapBuilderTest.java b/web/src/test/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapBuilderTest.java index 88ab949201049..07c7f06a7d291 100644 --- a/web/src/test/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapBuilderTest.java +++ b/web/src/test/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapBuilderTest.java @@ -79,7 +79,7 @@ public class ApplicationMapBuilderTest { private AgentInfoServerGroupListDataSource agentInfoServerGroupListDataSource; - private long buildTimeoutMillis = 1000; + private final long buildTimeoutMillis = 1000; @BeforeEach public void setUp() { @@ -110,7 +110,7 @@ public List answer(InvocationOnMock invocation) { when(mapResponseDao.selectResponseTime(any(Application.class), any(Range.class))).thenAnswer(responseTimeAnswer); when(responseHistograms.getResponseTimeList(any(Application.class))).thenAnswer(responseTimeAnswer); - when(agentInfoService.getAgentsByApplicationName(anyString(), anyLong())).thenAnswer(new Answer>() { + when(agentInfoService.getAgentsByApplicationName(anyString(), anyLong())).thenAnswer(new Answer<>() { @Override public Set answer(InvocationOnMock invocation) throws Throwable { String applicationName = invocation.getArgument(0); @@ -120,7 +120,7 @@ public Set answer(InvocationOnMock invocation) throws Throwable return Set.of(new AgentAndStatus(agentInfo, agentStatus)); } }); - when(agentInfoService.getAgentsByApplicationNameWithoutStatus(anyString(), anyLong())).thenAnswer(new Answer>() { + when(agentInfoService.getAgentsByApplicationNameWithoutStatus(anyString(), anyLong())).thenAnswer(new Answer<>() { @Override public Set answer(InvocationOnMock invocation) throws Throwable { String applicationName = invocation.getArgument(0); @@ -128,7 +128,7 @@ public Set answer(InvocationOnMock invocation) throws Throwable { return Set.of(agentInfo); } }); - when(agentInfoService.getAgentStatus(anyString(), anyLong())).thenAnswer(new Answer() { + when(agentInfoService.getAgentStatus(anyString(), anyLong())).thenAnswer(new Answer<>() { @Override public AgentStatus answer(InvocationOnMock invocation) throws Throwable { String agentId = invocation.getArgument(0);