Merge pull request #6888 from eclipse/jetty-10.0.x-6100-WindowsTests

Issue #6100 - fix flaky test MavenMetadataTest
This commit is contained in:
Lachlan 2021-09-23 18:30:34 +10:00 committed by GitHub
commit f22bfcb887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class MavenMetadataTest
@Test
public void testIsExpiredTimestampYesterday()
{
LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
LocalDateTime yesterday = LocalDateTime.now(ZoneId.of("UTC")).minusDays(1);
String timestamp = getTimestampFormatter().format(yesterday);
assertTrue(MavenMetadata.isExpiredTimestamp(timestamp), "Timestamp should be stale: " + timestamp);
}