AnalyticsServiceElasticsearch extends AbstractAnalyticsService { @Override public void storeNodeDetails(String tenantId, List<NodeDetails> nodeDetails) throws StoreException { bulkStoreApmEvents(tenantId, nodeDetails, NODE_DETAILS_TYPE); }  @Override List<TransactionInfo> getTransactionInfo(String tenantId, Criteria criteria); @Override List<PropertyInfo> getPropertyInfo(String tenantId, Criteria criteria); @Override long getTraceCompletionCount(String tenantId, Criteria criteria); @Override long getTraceCompletionFaultCount(String tenantId, Criteria criteria); @Override List<CompletionTime> getTraceCompletions(String tenantId, Criteria criteria); @Override Percentiles getTraceCompletionPercentiles(String tenantId, Criteria criteria); @Override List<TimeseriesStatistics> getTraceCompletionTimeseriesStatistics(String tenantId, Criteria criteria, long interval); @Override List<Cardinality> getTraceCompletionFaultDetails(String tenantId, Criteria criteria); @Override List<Cardinality> getTraceCompletionPropertyDetails(String tenantId, Criteria criteria, String property); @Override List<NodeTimeseriesStatistics> getNodeTimeseriesStatistics(String tenantId, Criteria criteria, long interval); @Override Collection<NodeSummaryStatistics> getNodeSummaryStatistics(String tenantId, Criteria criteria); @Override List<TimeseriesStatistics> getEndpointResponseTimeseriesStatistics(String tenantId, Criteria criteria, long interval); @Override Set<String> getHostNames(String tenantId, Criteria criteria); @Override void storeCommunicationDetails(String tenantId, List<CommunicationDetails> communicationDetails); @Override void storeNodeDetails(String tenantId, List<NodeDetails> nodeDetails); @Override void storeTraceCompletions(String tenantId, List<CompletionTime> completionTimes); @Override void clear(String tenantId);  }
@Test public void testGetCommunicationSummaryStatisticsServiceNameMissingOperation() throws StoreException { NodeDetails ct1 = new NodeDetails(); ct1.setUri("in1"); ct1.setTransaction("testapp"); ct1.getProperties().add(new Property("prop", "val")); ct1.getProperties().add(new Property(Constants.PROP_SERVICE_NAME, "wildfly")); ct1.setInitial(true); analytics.storeNodeDetails(null, Arrays.asList(ct1)); Criteria criteria = new Criteria() .setStartTime(0) .setEndTime(100000) .setTransaction("testapp"); Collection<CommunicationSummaryStatistics> communicationSummaryStatisticsList = analytics.getCommunicationSummaryStatistics(null, criteria, false); Assert.assertEquals(1, communicationSummaryStatisticsList.size()); CommunicationSummaryStatistics communicationSummaryStatistics = communicationSummaryStatisticsList.iterator().next(); Assert.assertEquals("wildfly", communicationSummaryStatistics.getServiceName()); }
@Test public void testGetCommunicationSummaryStatisticsServiceNameMissingURI() throws StoreException { NodeDetails ct1 = new NodeDetails(); ct1.setOperation("op1"); ct1.getProperties().add(new Property(Constants.PROP_SERVICE_NAME, "wildfly")); ct1.setInitial(true); analytics.storeNodeDetails(null, Arrays.asList(ct1)); Criteria criteria = new Criteria() .setStartTime(0) .setEndTime(100000); Collection<CommunicationSummaryStatistics> communicationSummaryStatisticsList = analytics.getCommunicationSummaryStatistics(null, criteria, false); Assert.assertEquals(1, communicationSummaryStatisticsList.size()); CommunicationSummaryStatistics communicationSummaryStatistics = communicationSummaryStatisticsList.iterator().next(); Assert.assertEquals("wildfly", communicationSummaryStatistics.getServiceName()); }