From 9bb3c0d4ced88c689da66f6e759ebc14ef2a2ee6 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Fri, 30 Aug 2019 23:07:09 +0200 Subject: [PATCH] Relaxing precision for date comparison in unit test --- .../archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java index 89ddd63ce..8b27d5241 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java +++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java @@ -126,7 +126,7 @@ public class NewArtifactsRssFeedProcessorTest assertTrue( feed.getDescription().equals( "New artifacts found in repository 'test-repo' during repository scan." ) ); assertTrue( feed.getLanguage().equals( "en-us" ) ); - assertTrue( feed.getPublishedDate().toInstant().equals( whenGathered.toInstant() ) ); + assertTrue( feed.getPublishedDate().toInstant().truncatedTo( ChronoUnit.MILLIS ).equals( whenGathered.toInstant().truncatedTo( ChronoUnit.MILLIS ) ) ); List entries = feed.getEntries(); assertEquals( entries.size(), 1 ); -- 2.39.5