phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mujt...@apache.org
Subject phoenix git commit: PHOENIX-2592 Pherf RuleGeneratorTest.testDateGenerator() is flapping (karan.singhal)
Date Fri, 15 Jan 2016 20:27:43 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 ad91debaa -> 922966218


PHOENIX-2592 Pherf RuleGeneratorTest.testDateGenerator() is flapping (karan.singhal)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 922966218997042b130073b0dd97e2b7f1d95102
Parents: ad91deb
Author: Mujtaba <mujtaba@apache.org>
Authored: Fri Jan 15 12:27:33 2016 -0800
Committer: Mujtaba <mujtaba@apache.org>
Committed: Fri Jan 15 12:27:33 2016 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/phoenix/pherf/rules/RulesApplier.java    | 3 ++-
 .../src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/92296621/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/RulesApplier.java
----------------------------------------------------------------------
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/RulesApplier.java
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/RulesApplier.java
index 202c8b5..d270df6 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/RulesApplier.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/rules/RulesApplier.java
@@ -238,7 +238,8 @@ public class RulesApplier {
 
         // Get Ms Date between min and max
         synchronized (randomDataGenerator) {
-            long rndLong = randomDataGenerator.nextLong(minDt.getMillis(), maxDt.getMillis());
+            //Make sure date generated is exactly between the passed limits
+            long rndLong = randomDataGenerator.nextLong(minDt.getMillis()+1, maxDt.getMillis()-1);
             dt = new DateTime(rndLong, PherfConstants.DEFAULT_TIME_ZONE);
         }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/92296621/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java
----------------------------------------------------------------------
diff --git a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java
index 71b785b..c2eae86 100644
--- a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java
+++ b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/RuleGeneratorTest.java
@@ -49,7 +49,6 @@ import org.junit.Test;
 public class RuleGeneratorTest {
     private static final String matcherScenario = PherfConstants.SCENARIO_ROOT_PATTERN +
".xml";
 
-    @Ignore("Flapping - see PHOENIX-2592")
     @Test
     public void testDateGenerator() throws Exception {
         XMLConfigParser parser = new XMLConfigParser(matcherScenario);


Mime
View raw message