PHOENIX-2612 RuleGeneartorTest updated with right pattern (Karan Singhal)

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

Branch: refs/heads/calcite
Commit: dab79cbe0e4d10e1c259198de8e95b7e93d66b57
Parents: d345b88
Author: James Taylor <jtay...@salesforce.com>
Authored: Wed Jan 20 21:06:32 2016 -0800
Committer: James Taylor <jtay...@salesforce.com>
Committed: Wed Jan 20 21:06:32 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/phoenix/blob/dab79cbe/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
----------------------------------------------------------------------
diff --git 
a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java 
b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
index 42b5d21..bbae6ea 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/PherfConstants.java
@@ -47,6 +47,7 @@ public class PherfConstants {
             SCENARIO_ROOT_PATTERN =
                        ".*" + PherfConstants.RESOURCE_SCENARIO.substring(1) + 
".*" + PherfConstants.RESOURCE_SCENARIO.substring(1) + ".*";
     public static final String SCHEMA_ROOT_PATTERN = ".*";
+    public static final String TEST_SCENARIO_ROOT_PATTERN = ".*" + "test" + 
"_" + PherfConstants.RESOURCE_SCENARIO.substring(1);
     public static final String PHERF_PROPERTIES = "pherf.properties";
 
     public static final String EXPORT_DIR = "CSV_EXPORT";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dab79cbe/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResourceTest.java
----------------------------------------------------------------------
diff --git 
a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResourceTest.java 
b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResourceTest.java
index cd567cb..d8cad48 100644
--- a/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResourceTest.java
+++ b/phoenix-pherf/src/test/java/org/apache/phoenix/pherf/ResourceTest.java
@@ -43,7 +43,7 @@ public class ResourceTest {
     @Test
     public void testScenarioResourceList() throws Exception {
         String extension = ".xml";
-        assertResources(PherfConstants.SCENARIO_ROOT_PATTERN + extension, 
PherfConstants.RESOURCE_SCENARIO, extension);
+        assertResources(PherfConstants.TEST_SCENARIO_ROOT_PATTERN + extension, 
PherfConstants.RESOURCE_SCENARIO, extension);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/dab79cbe/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..b26b2f7 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
@@ -47,9 +47,8 @@ import org.junit.Ignore;
 import org.junit.Test;
 
 public class RuleGeneratorTest {
-    private static final String matcherScenario = 
PherfConstants.SCENARIO_ROOT_PATTERN + ".xml";
+    private static final String matcherScenario = 
PherfConstants.TEST_SCENARIO_ROOT_PATTERN + ".xml";
 
-    @Ignore("Flapping - see PHOENIX-2592")
     @Test
     public void testDateGenerator() throws Exception {
         XMLConfigParser parser = new XMLConfigParser(matcherScenario);
@@ -252,7 +251,7 @@ public class RuleGeneratorTest {
         expectedValues.add("bBByYhnNbBs9kWu");
         expectedValues.add("cCCyYhnNbBs9kWr");
 
-        XMLConfigParser parser = new XMLConfigParser(".*test_scenario.xml");
+        XMLConfigParser parser = new XMLConfigParser(matcherScenario);
         WriteWorkload loader = new WriteWorkload(parser);
         RulesApplier rulesApplier = loader.getRulesApplier();
         Scenario scenario = parser.getScenarios().get(0);
@@ -270,7 +269,7 @@ public class RuleGeneratorTest {
 
     @Test
     public void testRuleOverrides() throws Exception {
-        XMLConfigParser parser = new XMLConfigParser(".*test_scenario.xml");
+        XMLConfigParser parser = new XMLConfigParser(matcherScenario);
         WriteWorkload loader = new WriteWorkload(parser);
         RulesApplier rulesApplier = loader.getRulesApplier();
         Scenario scenario = parser.getScenarios().get(0);

Reply via email to