Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 3e740cbc5 -> b4ac8c482
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/b4ac8c48 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b4ac8c48 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b4ac8c48 Branch: refs/heads/4.x-HBase-1.0 Commit: b4ac8c482c7819df7cab66e61fa1bbc548191858 Parents: 3e740cb Author: Mujtaba <mujt...@apache.org> Authored: Fri Jan 15 12:20:30 2016 -0800 Committer: Mujtaba <mujt...@apache.org> Committed: Fri Jan 15 12:20:30 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/b4ac8c48/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 2b1689a..2ef4a7c 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 @@ -233,7 +233,8 @@ public class RulesApplier { DateTime dt; // 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, minDt.getZone()); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/b4ac8c48/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 2286739..c4e33f0 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);