eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinh...@apache.org
Subject incubator-eagle git commit: [MINOR] Sleep 1 ms after versionId was generated
Date Fri, 02 Dec 2016 07:58:22 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master a292c1556 -> e6c4b0a73


[MINOR] Sleep 1 ms after versionId was generated

[MINOR] Sleep 1 ms after versionId was generated
- VersionId is the same with one generated in last loop randomly, the test failed in this
case.

Author: chitin <chitin1027@gmail.com>

Closes #706 from chitin/MINOR_JDBCTEST.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/e6c4b0a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/e6c4b0a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/e6c4b0a7

Branch: refs/heads/master
Commit: e6c4b0a731942c9c4bf746ecc6b067429d755ff6
Parents: a292c15
Author: chitin <chitin1027@gmail.com>
Authored: Fri Dec 2 15:58:15 2016 +0800
Committer: wujinhu <wujinhu920@126.com>
Committed: Fri Dec 2 15:58:15 2016 +0800

----------------------------------------------------------------------
 .../java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e6c4b0a7/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/test/java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/test/java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java
b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/test/java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java
index 9d188c4..dc7c657 100644
--- a/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/test/java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java
+++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-metadata-parent/alert-metadata/src/test/java/org/apache/eagle/alert/metadata/impl/JdbcImplTest.java
@@ -177,7 +177,7 @@ public class JdbcImplTest {
         List<String> reservedOnes = new ArrayList<>();
         for (int i = 0; i < 10; i++) {
             ScheduleState state = new ScheduleState();
-            String versionId = "state-" + System.currentTimeMillis();
+            String versionId = "state-" + (System.currentTimeMillis() + i);
             state.setVersion(versionId);
             state.setGenerateTime(String.valueOf(new Date().getTime()));
             dao.addScheduleState(state);
@@ -190,6 +190,8 @@ public class JdbcImplTest {
         Assert.assertTrue(scheduleStates.size() == maxCapacity);
         List<String> TargetVersions = new ArrayList<>();
         scheduleStates.stream().forEach(state -> TargetVersions.add(state.getVersion()));
+        LOG.debug(reservedOnes.toString());
+        LOG.debug(TargetVersions.toString());
         Assert.assertTrue(CollectionUtils.isEqualCollection(reservedOnes, TargetVersions));
     }
 }


Mime
View raw message