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

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

commit 05a0614883baa37645eaeea17174cc154094fcd4
Author: Matthias Bläsing <mblaes...@doppel-helix.eu>
AuthorDate: Sun Jun 9 22:23:07 2019 +0200

    Support running AddTest with millisecond resolution of last modified time
---
 .../test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
index 6c7e7bc..689908b 100644
--- 
a/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
+++ 
b/ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/AddTest.java
@@ -527,7 +527,7 @@ public class AddTest extends AbstractGitTestCase {
         DirCacheEntry e = repository.readDirCache().getEntry(link.getName());
         assertEquals(FileMode.SYMLINK, e.getFileMode());
         ObjectId id = e.getObjectId();
-        assertEquals(ts, e.getLastModified() / 1000 * 1000);
+        assertTrue((ts - 1000) < e.getLastModified() && (ts + 1000) > 
e.getLastModified());
         ObjectReader reader = repository.getObjectDatabase().newReader();
         assertTrue(reader.has(e.getObjectId()));
         byte[] bytes = reader.open(e.getObjectId()).getBytes();
@@ -543,7 +543,7 @@ public class AddTest extends AbstractGitTestCase {
         assertEquals(FileMode.SYMLINK, e2.getFileMode());
         assertEquals(id, e2.getObjectId());
         assertEquals(0, e2.getLength());
-        assertEquals(ts, e2.getLastModified() / 1000 * 1000);
+        assertTrue((ts - 1000) < e2.getLastModified() && (ts + 1000) > 
e2.getLastModified());
         assertTrue(reader.has(e2.getObjectId()));
         bytes = reader.open(e2.getObjectId()).getBytes();
         assertEquals(path, RawParseUtils.decode(bytes));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to