Skip to content

Commit 634d337

Browse files
author
Manpreet Singh
committed
Fix test failures
1 parent 642f421 commit 634d337

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

src/test/java/io/opentelemetry/contrib/generator/telemetry/TestAllGenerators.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ public void validatePacketCounts() {
7575
int metricPayloadCount = 10;
7676
int logsPayloadCount = 20;
7777
int expectedMetricPackets = METRIC_REPORTING_ENTITIES_COUNT * metricPayloadCount;
78-
//Add packets for aggregating, non-reporting entities
79-
expectedMetricPackets = expectedMetricPackets + 600;
8078
int expectedLogsPackets = LOG_REPORTING_ENTITIES_COUNT * logsPayloadCount;
8179
int expectedSpanPackets = 11518;
8280
Assert.assertEquals(testStore.getMetricsPacketCount(), expectedMetricPackets, "Mismatch in expected metric packets count");

src/test/java/io/opentelemetry/contrib/generator/telemetry/TestMetricsGenerator.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@ public void generateData() {
5959
public void testPayloadAndPacketCounts() {
6060
//Check payload count = payload count * each of 8 types of entities
6161
int payloadCount = 8 * PAYLOAD_COUNT;
62-
//Add payloads for aggregating, non-reporting entities
63-
payloadCount = payloadCount + 19;
6462
Assert.assertEquals(testStore.getMetricPayloads().size(), payloadCount, "Mismatch in payload count");
6563
//Check packet count = payload count * number of entities
6664
int expectedPacketCount = REPORTING_ENTITIES_COUNT * PAYLOAD_COUNT;
67-
expectedPacketCount = expectedPacketCount + 600;
6865
Assert.assertEquals(testStore.getMetricsPacketCount(), expectedPacketCount, "Mismatch in resource metrics packet count");
6966
//Check metric count for each metric = number of reporting entities * number of payloads
7067
}

src/test/java/io/opentelemetry/contrib/generator/telemetry/TestMetricsGeneratorWithOverrides.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,11 @@ public void testPayloadAndPacketCounts() {
6464
int AWS_EBS_PAYLOADS = 15;
6565
int payloadCount = NW_IFC_PAYLOADS + CONTAINER_PAYLOADS + MACHINE_PAYLOADS + NODE_PAYLOADS + POD_PAYLOADS +
6666
DISK_PAYLOADS + AWS_RDS_PAYLOADS + AWS_EBS_PAYLOADS;
67-
//Add payloads for aggregating, non-reporting entities
68-
payloadCount = payloadCount + 19;
6967
Assert.assertEquals(testStore.getMetricPayloads().size(), payloadCount, "Mismatch in payload count");
7068
//Check packet count = payload count * number of entities
7169
int expectedPacketCount = (NW_IFC_PAYLOADS * NETWORK_INTERFACE_COUNT) + (CONTAINER_PAYLOADS * CONTAINER_COUNT) +
7270
(MACHINE_PAYLOADS * MACHINE_COUNT) + (NODE_PAYLOADS * NODE_COUNT) + (POD_PAYLOADS * POD_COUNT) +
7371
(DISK_PAYLOADS * DISK_COUNT) + (AWS_RDS_PAYLOADS * AWS_RDS_COUNT) + (AWS_EBS_PAYLOADS * AWS_EBS_COUNT);
74-
expectedPacketCount = expectedPacketCount + 600;
7572
Assert.assertEquals(testStore.getMetricsPacketCount(), expectedPacketCount, "Mismatch in resource metrics packet count");
7673
//Check metric count for each metric = number of reporting entities * number of payloads
7774
}

0 commit comments

Comments
 (0)