Skip to content

Commit 5bed1ea

Browse files
Anirudh Reddy MalgariAnirudh Reddy Malgari
authored andcommitted
fixed another test with timezone change
1 parent 1e33705 commit 5bed1ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

datahub-frontend/test/app/ApplicationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,12 +940,12 @@ public void testHappyPathOidc() throws ParseException {
940940
assertEquals(TEST_USER, data.get("actor"));
941941
// Default expiration is 24h, so should always be less than current time + 1 day since it stamps
942942
// the time before this executes. Use a more generous tolerance to account for timezone
943-
// differences
944-
// and test execution time variations.
943+
// differences, DST transitions, and test execution time variations.
944+
// Increased tolerance to 22-26 hours to handle DST transitions (which can cause 1-hour shifts)
945945
Date maxExpectedExpiration =
946-
new Date(System.currentTimeMillis() + (25 * 60 * 60 * 1000)); // 25 hours
946+
new Date(System.currentTimeMillis() + (26 * 60 * 60 * 1000)); // 26 hours
947947
Date minExpectedExpiration =
948-
new Date(System.currentTimeMillis() + (23 * 60 * 60 * 1000)); // 23 hours
948+
new Date(System.currentTimeMillis() + (22 * 60 * 60 * 1000)); // 22 hours
949949
Date actualExpiration = claims.getExpirationTime();
950950

951951
assertTrue(

0 commit comments

Comments
 (0)