From 0e462711cad52c0b0d432494fd7b2b451128b84d Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Tue, 31 May 2016 10:05:39 +0200 Subject: [PATCH] Cleanup TCK implementation - remove unused config file (compiled runtime) - rename classes and files to clarify configurations (only planners) - use named constants to clarify purpose of string arguments --- .../test/java/cypher/FeatureSuiteTest.java | 37 ++++++++++++------- .../cypher/db/config/cost-compiled.json | 4 -- .../{cost-interpreted.json => cost.json} | 0 3 files changed, 23 insertions(+), 18 deletions(-) delete mode 100644 community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-compiled.json rename community/cypher/compatibility-suite/src/test/resources/cypher/db/config/{cost-interpreted.json => cost.json} (100%) diff --git a/community/cypher/compatibility-suite/src/test/java/cypher/FeatureSuiteTest.java b/community/cypher/compatibility-suite/src/test/java/cypher/FeatureSuiteTest.java index 8d775448e51d0..335e58e2edc0f 100644 --- a/community/cypher/compatibility-suite/src/test/java/cypher/FeatureSuiteTest.java +++ b/community/cypher/compatibility-suite/src/test/java/cypher/FeatureSuiteTest.java @@ -37,32 +37,41 @@ public class FeatureSuiteTest @RunWith( Cucumber.class ) @CucumberOptions( plugin = { - "html:target/rule-interpreted", - "cypher.feature.reporting.CypherResultReporter:target/rule-interpreted", - "cypher.cucumber.db.DatabaseProvider:target/dbs", - "cypher.cucumber.db.DatabaseConfigProvider:/cypher/db/config/rule.json" + NAMED_GRAPHS_DBS, + DB_CONFIG + "rule.json", + HTML_REPORT + "rule", + JSON_REPORT + "rule" }, - glue = { "classpath:cypher/feature/steps" }, - features = { "target/features/" + FEATURE_TO_RUN }, + glue = { GLUE_PATH }, + features = { FEATURE_PATH + FEATURE_TO_RUN }, strict = true ) - public static class RuleInterpreted + public static class Rule { } @RunWith( Cucumber.class ) @CucumberOptions( plugin = { - "html:target/cost-interpreted", - "cypher.feature.reporting.CypherResultReporter:target/cost-interpreted", - "cypher.cucumber.db.DatabaseProvider:target/dbs", - "cypher.cucumber.db.DatabaseConfigProvider:/cypher/db/config/cost-interpreted.json", + NAMED_GRAPHS_DBS, + DB_CONFIG + "cost.json", + HTML_REPORT + "cost", + JSON_REPORT + "cost" }, - glue = { "classpath:cypher/feature/steps" }, - features = { "target/features/" + FEATURE_TO_RUN }, + glue = { GLUE_PATH }, + features = { FEATURE_PATH + FEATURE_TO_RUN }, strict = true ) - public static class CostInterpreted + public static class Cost { } + + // constants for TCK configuration + + private static final String NAMED_GRAPHS_DBS = "cypher.cucumber.db.DatabaseProvider:target/dbs"; + private static final String DB_CONFIG = "cypher.cucumber.db.DatabaseConfigProvider:/cypher/db/config/"; + private static final String HTML_REPORT = "html:target/"; + private static final String JSON_REPORT = "cypher.feature.reporting.CypherResultReporter:target/"; + private static final String GLUE_PATH = "classpath:cypher/feature/steps"; + private static final String FEATURE_PATH = "target/features/"; } diff --git a/community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-compiled.json b/community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-compiled.json deleted file mode 100644 index 15c5341800dd8..0000000000000 --- a/community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-compiled.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "planner" : "cost", - "runtime" : "compiled" -} diff --git a/community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-interpreted.json b/community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost.json similarity index 100% rename from community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost-interpreted.json rename to community/cypher/compatibility-suite/src/test/resources/cypher/db/config/cost.json