]> source.dussan.org Git - archiva.git/commitdiff
Relaxing precision for date comparison in unit test
authorMartin Stockhammer <martin_s@apache.org>
Fri, 30 Aug 2019 21:07:09 +0000 (23:07 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Fri, 30 Aug 2019 21:07:09 +0000 (23:07 +0200)
archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java

index 89ddd63ce38c2335fd5b3ea4ef6b69dea857656d..8b27d5241565f36106fa61920701bee55d727bd7 100644 (file)
@@ -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<SyndEntry> entries = feed.getEntries();
         assertEquals( entries.size(), 1 );