From 0ff88b0e8da5cae764510edfb226947e4ba52b83 Mon Sep 17 00:00:00 2001 From: zentol Date: Wed, 9 May 2018 10:52:34 +0200 Subject: [PATCH] [FLINK-9138][docs][tests] Make ConfigOptionsDocsCompletenessTest an IT case This closes #5975. --- flink-docs/pom.xml | 10 ++++++++++ ...t.java => ConfigOptionsDocsCompletenessITCase.java} | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) rename flink-docs/src/test/java/org/apache/flink/docs/configuration/{ConfigOptionsDocsCompletenessTest.java => ConfigOptionsDocsCompletenessITCase.java} (96%) diff --git a/flink-docs/pom.xml b/flink-docs/pom.xml index ef02d2c4cea..223fe9d16c0 100644 --- a/flink-docs/pom.xml +++ b/flink-docs/pom.xml @@ -131,6 +131,16 @@ under the License. + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${rootDir} + + + diff --git a/flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessTest.java b/flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessITCase.java similarity index 96% rename from flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessTest.java rename to flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessITCase.java index 40a48b823d1..5b6b5b50c9b 100644 --- a/flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessTest.java +++ b/flink-docs/src/test/java/org/apache/flink/docs/configuration/ConfigOptionsDocsCompletenessITCase.java @@ -49,7 +49,7 @@ import static org.apache.flink.docs.configuration.ConfigOptionsDocGenerator.stri * the same key with different descriptions/default values), and that the documentation does not refer to non-existent * options. */ -public class ConfigOptionsDocsCompletenessTest { +public class ConfigOptionsDocsCompletenessITCase { @Test public void testDocsCompleteness() throws IOException, ClassNotFoundException { @@ -99,7 +99,7 @@ public class ConfigOptionsDocsCompletenessTest { } private static Map parseDocumentedOptions() throws IOException { - Path includeFolder = Paths.get("..", "docs", "_includes", "generated").toAbsolutePath(); + Path includeFolder = Paths.get(System.getProperty("rootDir"), "docs", "_includes", "generated").toAbsolutePath(); return Files.list(includeFolder) .filter(path -> path.getFileName().toString().contains("configuration")) .flatMap(file -> { @@ -145,7 +145,7 @@ public class ConfigOptionsDocsCompletenessTest { Map existingOptions = new HashMap<>(32); for (OptionsClassLocation location : LOCATIONS) { - processConfigOptions("..", location.getModule(), location.getPackage(), optionsClass -> { + processConfigOptions(System.getProperty("rootDir"), location.getModule(), location.getPackage(), optionsClass -> { List configOptions = extractConfigOptions(optionsClass); for (ConfigOptionsDocGenerator.OptionWithMetaInfo option : configOptions) { String key = option.option.key();