You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2019/08/30 21:07:15 UTC

[archiva] branch master updated: Relaxing precision for date comparison in unit test

This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git


The following commit(s) were added to refs/heads/master by this push:
     new 9bb3c0d  Relaxing precision for date comparison in unit test
9bb3c0d is described below

commit 9bb3c0d4ced88c689da66f6e759ebc14ef2a2ee6
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Fri Aug 30 23:07:09 2019 +0200

    Relaxing precision for date comparison in unit test
---
 .../apache/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 89ddd63..8b27d52 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<SyndEntry> entries = feed.getEntries();
         assertEquals( entries.size(), 1 );