From 2a1f937bcf560e2a516a44bf44dcb8c3d48b7399 Mon Sep 17 00:00:00 2001 From: Maikel Arabori Date: Thu, 16 Nov 2023 06:46:07 -0300 Subject: [PATCH 1/2] test: Attempt to fix failure on Jenkins only --- .../java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java index 87e3304a1d0f..041488186f5d 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java @@ -254,7 +254,7 @@ public void setUpTest() throws IOException, InterruptedException { // We need to make sure that table generation start time is greater than // lastUpdated on tables populated in the setup Date oneSecondFromNow = - Date.from(LocalDateTime.now().plusSeconds(1).atZone(ZoneId.systemDefault()).toInstant()); + Date.from(LocalDateTime.now().plusSeconds(10).atZone(ZoneId.systemDefault()).toInstant()); assertNull( systemSettingManager.getSystemSetting( From a74b2bebf5c3578492c88a843d3d5727e19ec602 Mon Sep 17 00:00:00 2001 From: Maikel Arabori Date: Thu, 16 Nov 2023 07:37:54 -0300 Subject: [PATCH 2/2] refactor: Rename variable --- .../org/hisp/dhis/analytics/data/AnalyticsServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java index 041488186f5d..1990ed0c7234 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/analytics/data/AnalyticsServiceTest.java @@ -253,7 +253,7 @@ public void setUpTest() throws IOException, InterruptedException { // We need to make sure that table generation start time is greater than // lastUpdated on tables populated in the setup - Date oneSecondFromNow = + Date tenSecondsFromNow = Date.from(LocalDateTime.now().plusSeconds(10).atZone(ZoneId.systemDefault()).toInstant()); assertNull( @@ -265,7 +265,7 @@ public void setUpTest() throws IOException, InterruptedException { processStartTime = new Date(); // Generate analytics tables analyticsTableGenerator.generateTables( - AnalyticsTableUpdateParams.newBuilder().withStartTime(oneSecondFromNow).build(), + AnalyticsTableUpdateParams.newBuilder().withStartTime(tenSecondsFromNow).build(), NoopJobProgress.INSTANCE); }