From 95354aa6424f207d2f491e2c0e439931f75a3739 Mon Sep 17 00:00:00 2001 From: shahid Date: Wed, 8 Jan 2025 22:48:27 +0500 Subject: [PATCH] NMS-16987, updated related test to fix build failure --- .../test/java/org/opennms/smoketest/UsageStatisticsIT.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/smoke-test/src/test/java/org/opennms/smoketest/UsageStatisticsIT.java b/smoke-test/src/test/java/org/opennms/smoketest/UsageStatisticsIT.java index 06e4ea2ec23f..8b50ce7a43ea 100644 --- a/smoke-test/src/test/java/org/opennms/smoketest/UsageStatisticsIT.java +++ b/smoke-test/src/test/java/org/opennms/smoketest/UsageStatisticsIT.java @@ -26,6 +26,7 @@ import static org.hamcrest.Matchers.anEmptyMap; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.matchesPattern; import static org.junit.Assert.assertEquals; @@ -129,7 +130,7 @@ public void testUsageStatistics() throws Exception { assertThat((long) usageReport.get("pollsCompleted"), is(0L)); assertThat((long) usageReport.get("eventLogsProcessed"), greaterThan(1L)); assertThat((long) usageReport.get("coreFlowsPersisted"), is(0L)); - assertThat((long) usageReport.get("flowsPerSecond"), is(0L)); + assertThat((long) usageReport.get("flowsPerSecond"), greaterThanOrEqualTo(0L)); assertThat((String) usageReport.get("databaseProductVersion"), matchesPattern("^\\d+\\.\\d+$")); assertThat((String) usageReport.get("databaseProductName"), is("PostgreSQL")); assertThat((long) usageReport.get("monitoredServices"), is(0L)); @@ -137,9 +138,9 @@ public void testUsageStatistics() throws Exception { assertThat((long) usageReport.get("snmpInterfaces"), is(0L)); assertThat((long) usageReport.get("nodes"), is(7L)); assertThat((long) usageReport.get("events"), greaterThan(1L)); - assertThat((long) usageReport.get("eventsPastHours"), is(0L)); + assertThat((long) usageReport.get("eventsPastHours"), greaterThanOrEqualTo(0L)); assertThat((long) usageReport.get("alarms"), is(0L)); - assertThat((long) usageReport.get("alarmsPastHours"), is(0L)); + assertThat((long) usageReport.get("alarmsPastHours"), greaterThanOrEqualTo(0L)); assertThat((long) usageReport.get("minions"), is(0L)); final Map appliances = (Map)usageReport.get("applianceCounts");