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

boglesby pushed a commit to branch feature/GEODE-3810
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 442c74586ec882089acfac5e661cb6211c043b93
Author: Barry Oglesby <bogle...@pivotal.io>
AuthorDate: Wed Oct 18 17:47:38 2017 -0700

    GEODE-3810: Incremented test timestamp by 1 in case it is the same as the 
previous event
---
 .../internal/cache/UpdateVersionDUnitTest.java     | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git 
a/geode-wan/src/test/java/org/apache/geode/internal/cache/UpdateVersionDUnitTest.java
 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/UpdateVersionDUnitTest.java
index 60fda06..8bd445c 100644
--- 
a/geode-wan/src/test/java/org/apache/geode/internal/cache/UpdateVersionDUnitTest.java
+++ 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/UpdateVersionDUnitTest.java
@@ -135,7 +135,11 @@ public class UpdateVersionDUnitTest extends 
JUnit4DistributedTestCase {
 
           int entryVersion = stamp.getEntryVersion() - 1;
           int dsid = stamp.getDistributedSystemId();
-          long time = System.currentTimeMillis();
+
+          // Increment the time by 1 in case the time is the same as the 
previous event.
+          // The entry's version timestamp can be incremented by 1 in certain 
circumstances.
+          // See AbstractRegionEntry.generateVersionTag.
+          long time = System.currentTimeMillis() + 1;
 
           versionTag.setEntryVersion(entryVersion);
           versionTag.setDistributedSystemId(dsid);
@@ -266,7 +270,11 @@ public class UpdateVersionDUnitTest extends 
JUnit4DistributedTestCase {
 
           int entryVersion = stamp.getEntryVersion() - 1;
           int dsid = stamp.getDistributedSystemId();
-          long time = System.currentTimeMillis();
+
+          // Increment the time by 1 in case the time is the same as the 
previous event.
+          // The entry's version timestamp can be incremented by 1 in certain 
circumstances.
+          // See AbstractRegionEntry.generateVersionTag.
+          long time = System.currentTimeMillis() + 1;
 
           versionTag.setEntryVersion(entryVersion);
           versionTag.setDistributedSystemId(dsid);
@@ -386,7 +394,11 @@ public class UpdateVersionDUnitTest extends 
JUnit4DistributedTestCase {
 
       int entryVersion = stamp.getEntryVersion() - 1;
       int dsid = stamp.getDistributedSystemId();
-      long time = System.currentTimeMillis();
+
+      // Increment the time by 1 in case the time is the same as the previous 
event.
+      // The entry's version timestamp can be incremented by 1 in certain 
circumstances.
+      // See AbstractRegionEntry.generateVersionTag.
+      long time = System.currentTimeMillis() + 1;
 
       versionTag.setEntryVersion(entryVersion);
       versionTag.setDistributedSystemId(dsid);
@@ -519,7 +531,11 @@ public class UpdateVersionDUnitTest extends 
JUnit4DistributedTestCase {
 
       int entryVersion = stamp.getEntryVersion() - 1;
       int dsid = stamp.getDistributedSystemId();
-      long time = System.currentTimeMillis();
+
+      // Increment the time by 1 in case the time is the same as the previous 
event.
+      // The entry's version timestamp can be incremented by 1 in certain 
circumstances.
+      // See AbstractRegionEntry.generateVersionTag.
+      long time = System.currentTimeMillis() + 1;
 
       versionTag.setEntryVersion(entryVersion);
       versionTag.setDistributedSystemId(dsid);

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <commits@geode.apache.org>.

Reply via email to