From 943c709e38799b0db9e1818c271fe43ba14c252f Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Tue, 8 Sep 2020 16:41:54 -0500 Subject: [PATCH 1/2] Remove integTest task from PluginBuildPlugin (#61879) This commit removes `integTest` task from all es-plugins. Most relevant projects have been converted to use yamlRestTest, javaRestTest, or internalClusterTest in prior PRs. A few projects needed to be adjusted to allow complete removal of this task * x-pack/plugin - converted to use yamlRestTest and javaRestTest * plugins/repository-hdfs - kept the integTest task, but use `rest-test` plugin to define the task * qa/die-with-dignity - convert to javaRestTest * x-pack/qa/security-example-spi-extension - convert to javaRestTest * multiple projects - remove the integTest.enabled = false (yay!) related: #61802 related: #60630 related: #59444 related: #59089 related: #56841 related: #59939 related: #55896 # Conflicts: # qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java # x-pack/qa/security-example-spi-extension/build.gradle --- .../gradle/plugin/PluginBuildPlugin.groovy | 26 --------------- .../gradle/plugin/PluginBuildPluginTests.java | 2 +- .../build.gradle | 1 - distribution/build.gradle | 4 --- modules/lang-expression/build.gradle | 2 -- modules/lang-painless/build.gradle | 2 -- modules/systemd/build.gradle | 1 - plugins/repository-hdfs/build.gradle | 9 +++++ plugins/transport-nio/build.gradle | 2 -- qa/die-with-dignity/build.gradle | 33 +++++-------------- .../qa/die_with_dignity/DieWithDignityIT.java | 7 ++-- x-pack/plugin/analytics/build.gradle | 1 - x-pack/plugin/async-search/build.gradle | 1 - x-pack/plugin/async/build.gradle | 2 +- x-pack/plugin/autoscaling/build.gradle | 2 -- x-pack/plugin/build.gradle | 29 ++++++++++------ x-pack/plugin/ccr/build.gradle | 2 -- x-pack/plugin/data-streams/build.gradle | 1 - x-pack/plugin/deprecation/build.gradle | 1 - x-pack/plugin/enrich/build.gradle | 3 -- x-pack/plugin/eql/build.gradle | 3 -- x-pack/plugin/frozen-indices/build.gradle | 5 --- x-pack/plugin/graph/build.gradle | 1 - x-pack/plugin/identity-provider/build.gradle | 5 --- x-pack/plugin/ilm/build.gradle | 1 - x-pack/plugin/logstash/build.gradle | 1 - .../mapper-constant-keyword/build.gradle | 1 - x-pack/plugin/mapper-flattened/build.gradle | 1 - x-pack/plugin/ml/build.gradle | 7 ---- x-pack/plugin/monitoring/build.gradle | 5 --- x-pack/plugin/ql/build.gradle | 5 --- .../repositories-metering-api/build.gradle | 10 ------ x-pack/plugin/rollup/build.gradle | 1 - x-pack/plugin/runtime-fields/build.gradle | 3 -- .../qa/with-security/build.gradle | 10 +++--- .../xpack/security/PermissionsIT.java | 0 .../plugin/search-business-rules/build.gradle | 2 -- .../plugin/searchable-snapshots/build.gradle | 7 +--- x-pack/plugin/security/build.gradle | 5 --- x-pack/plugin/sql/build.gradle | 3 -- .../test/rest/CatIndicesWithSecurityIT.java | 0 .../xpack/test/rest/XPackRestIT.java | 4 +-- x-pack/plugin/stack/build.gradle | 1 - x-pack/plugin/transform/build.gradle | 5 --- x-pack/plugin/vectors/build.gradle | 1 - x-pack/plugin/voting-only-node/build.gradle | 5 --- x-pack/plugin/watcher/build.gradle | 5 --- x-pack/plugin/wildcard/build.gradle | 1 - .../build.gradle | 15 +++++---- .../example/realm/CustomRealmIT.java | 0 .../realm/CustomRoleMappingRealmIT.java | 4 +-- .../example/role/CustomRolesProviderIT.java | 3 +- 52 files changed, 62 insertions(+), 189 deletions(-) rename qa/die-with-dignity/src/{test => javaRestTest}/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java (94%) rename x-pack/plugin/runtime-fields/qa/with-security/src/{test => javaRestTest}/java/org/elasticsearch/xpack/security/PermissionsIT.java (100%) rename x-pack/plugin/src/{test => javaRestTest}/java/org/elasticsearch/xpack/test/rest/CatIndicesWithSecurityIT.java (100%) rename x-pack/plugin/src/{test => yamlRestTest}/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java (98%) rename x-pack/qa/security-example-spi-extension/src/{test => javaRestTest}/java/org/elasticsearch/example/realm/CustomRealmIT.java (100%) rename x-pack/qa/security-example-spi-extension/src/{test => javaRestTest}/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java (95%) rename x-pack/qa/security-example-spi-extension/src/{test => javaRestTest}/java/org/elasticsearch/example/role/CustomRolesProviderIT.java (95%) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy index f043959fca058..897717810ef27 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy @@ -25,7 +25,6 @@ import org.elasticsearch.gradle.Version import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.dependencies.CompileOnlyResolvePlugin import org.elasticsearch.gradle.info.BuildParams -import org.elasticsearch.gradle.test.RestIntegTestTask import org.elasticsearch.gradle.test.RestTestBasePlugin import org.elasticsearch.gradle.testclusters.RunTask import org.elasticsearch.gradle.util.Util @@ -62,16 +61,7 @@ class PluginBuildPlugin implements Plugin { boolean isXPackModule = project.path.startsWith(':x-pack:plugin') boolean isModule = project.path.startsWith(':modules:') || isXPackModule - createIntegTestTask(project) createBundleTasks(project, extension) - project.tasks.named("integTest").configure { - it.dependsOn(project.tasks.named("bundlePlugin")) - } - if (isModule) { - project.testClusters.integTest.module(project.tasks.bundlePlugin.archiveFile) - } else { - project.testClusters.integTest.plugin(project.tasks.bundlePlugin.archiveFile) - } project.afterEvaluate { project.extensions.getByType(PluginPropertiesExtension).extendedPlugins.each { pluginName -> @@ -118,14 +108,6 @@ class PluginBuildPlugin implements Plugin { } } - //disable integTest task if project has been converted to use yaml or java rest test plugin - project.pluginManager.withPlugin("elasticsearch.yaml-rest-test") { - project.tasks.integTest.enabled = false - } - project.pluginManager.withPlugin("elasticsearch.java-rest-test") { - project.tasks.integTest.enabled = false - } - project.tasks.named('testingConventions').configure { naming.clear() naming { @@ -144,7 +126,6 @@ class PluginBuildPlugin implements Plugin { // allow running ES with this plugin in the foreground of a build project.tasks.register('run', RunTask) { dependsOn(project.tasks.bundlePlugin) - useCluster project.testClusters.integTest } } @@ -187,13 +168,6 @@ class PluginBuildPlugin implements Plugin { } } - /** Adds an integTest task which runs rest tests */ - private static void createIntegTestTask(Project project) { - RestIntegTestTask integTest = project.tasks.create('integTest', RestIntegTestTask.class) - integTest.mustRunAfter('precommit', 'test') - project.check.dependsOn(integTest) - } - /** * Adds a bundlePlugin task which builds the zip containing the plugin jars, * metadata, properties, and packaging files diff --git a/buildSrc/src/test/java/org/elasticsearch/gradle/plugin/PluginBuildPluginTests.java b/buildSrc/src/test/java/org/elasticsearch/gradle/plugin/PluginBuildPluginTests.java index bb5d3ddd6714f..1ec0ad93dfa45 100644 --- a/buildSrc/src/test/java/org/elasticsearch/gradle/plugin/PluginBuildPluginTests.java +++ b/buildSrc/src/test/java/org/elasticsearch/gradle/plugin/PluginBuildPluginTests.java @@ -50,7 +50,7 @@ public void testApply() { ); assertNotNull("plugin extensions has the right type", project.getExtensions().findByType(PluginPropertiesExtension.class)); - assertNotNull("plugin created an integTest class", project.getTasks().findByName("integTest")); + assertNull("plugin should not create the integTest task", project.getTasks().findByName("integTest")); } @Ignore("https://github.com/elastic/elasticsearch/issues/47123") diff --git a/client/client-benchmark-noop-api-plugin/build.gradle b/client/client-benchmark-noop-api-plugin/build.gradle index b22a220005244..6882dc0d780fc 100644 --- a/client/client-benchmark-noop-api-plugin/build.gradle +++ b/client/client-benchmark-noop-api-plugin/build.gradle @@ -35,4 +35,3 @@ dependenciesInfo.enabled = false // no unit tests test.enabled = false -integTest.enabled = false diff --git a/distribution/build.gradle b/distribution/build.gradle index fad61611efc87..1c7f2e7b0b1ac 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -253,10 +253,6 @@ project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each { copyLog4jProperties(buildOssLog4jConfig, module) copyLog4jProperties(buildDefaultLog4jConfig, module) - // make sure the module's integration tests run after the integ-test-zip (ie rest tests) - module.afterEvaluate({ - module.integTest.mustRunAfter(':distribution:archives:integ-test-zip:integTest') - }) restTestExpansions['expected.modules.count'] += 1 } diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 3b8c42fea93e6..f46e22da6d646 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -37,8 +37,6 @@ restResources { } } -integTest.enabled = false - tasks.named("dependencyLicenses").configure { mapping from: /lucene-.*/, to: 'lucene' mapping from: /asm-.*/, to: 'asm' diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 4f8aced4ff0cc..12d18b84f7733 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -54,8 +54,6 @@ restResources { } } -integTest.enabled = false - tasks.named("test").configure { // in WhenThingsGoWrongTests we intentionally generate an out of memory error, this prevents the heap from being dumped to disk jvmArgs '-XX:-OmitStackTraceInFastThrow', '-XX:-HeapDumpOnOutOfMemoryError' diff --git a/modules/systemd/build.gradle b/modules/systemd/build.gradle index 2863846801c3f..78589ff954156 100644 --- a/modules/systemd/build.gradle +++ b/modules/systemd/build.gradle @@ -22,4 +22,3 @@ esplugin { classname 'org.elasticsearch.systemd.SystemdPlugin' } -integTest.enabled = false diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index 9b3278391b14c..cef4464ecf831 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -29,6 +29,7 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE apply plugin: 'elasticsearch.test.fixtures' apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.rest-test' esplugin { description 'The HDFS repository plugin adds support for Hadoop Distributed File-System (HDFS) repositories.' @@ -94,6 +95,14 @@ tasks.named("dependencyLicenses").configure { mapping from: /hadoop-.*/, to: 'hadoop' } +tasks.named("integTest").configure { + it.dependsOn(project.tasks.named("bundlePlugin")) +} + +testClusters.integTest { + plugin(project.tasks.bundlePlugin.archiveFile) +} + String realm = "BUILD.ELASTIC.CO" String krb5conf = project(':test:fixtures:krb5kdc-fixture').ext.krb5Conf("hdfs") diff --git a/plugins/transport-nio/build.gradle b/plugins/transport-nio/build.gradle index a2c62b0bdccab..744a240f60f25 100644 --- a/plugins/transport-nio/build.gradle +++ b/plugins/transport-nio/build.gradle @@ -27,8 +27,6 @@ esplugin { hasClientJar = true } -// integTest have been converted to internalClusterTest -integTest.enabled = false dependencies { api project(':libs:elasticsearch-nio') diff --git a/qa/die-with-dignity/build.gradle b/qa/die-with-dignity/build.gradle index 23edc2ed85293..6c2faef271293 100644 --- a/qa/die-with-dignity/build.gradle +++ b/qa/die-with-dignity/build.gradle @@ -1,25 +1,6 @@ import org.elasticsearch.gradle.info.BuildParams -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -apply plugin: 'elasticsearch.testclusters' +apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.esplugin' esplugin { @@ -27,17 +8,21 @@ esplugin { classname 'org.elasticsearch.DieWithDignityPlugin' } -integTest { +dependencies { + // let the javaRestTest see the classpath of main + javaRestTestImplementation project.sourceSets.main.runtimeClasspath +} + +javaRestTest { systemProperty 'tests.security.manager', 'false' systemProperty 'tests.system_call_filter', 'false' - nonInputProperties.systemProperty 'log', "${-> testClusters.integTest.singleNode().getServerLog()}" + nonInputProperties.systemProperty 'log', "${-> testClusters.javaRestTest.singleNode().getServerLog()}" systemProperty 'runtime.java.home', BuildParams.runtimeJavaHome } -testClusters.integTest { +testClusters.javaRestTest { systemProperty "die.with.dignity.test", "whatever" } test.enabled = false -check.dependsOn integTest diff --git a/qa/die-with-dignity/src/test/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java b/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java similarity index 94% rename from qa/die-with-dignity/src/test/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java rename to qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java index 2874e22a50868..07a3e31f7d639 100644 --- a/qa/die-with-dignity/src/test/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java +++ b/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -67,9 +67,10 @@ public void testDieWithDignity() throws Exception { try { while (it.hasNext() && (fatalError == false || fatalErrorInThreadExiting == false)) { final String line = it.next(); - if (line.matches(".*ERROR.*o\\.e\\.ExceptionsHelper.*integTest-0.*fatal error.*")) { + if (containsAll(line, ".*ERROR.*", ".*ExceptionsHelper.*", ".*javaRestTest-0.*", ".*fatal error.*")) { fatalError = true; - } else if (line.matches(".*ERROR.*o\\.e\\.b\\.ElasticsearchUncaughtExceptionHandler.*integTest-0.*" + } else if (line.matches(".*ERROR.*o\\.e\\.b\\.ElasticsearchUncaughtExceptionHandler.*javaRestTest-0.*" + ".*integTest-0.*", + "fatal error in thread \\[Thread-\\d+\\], exiting.*")) { fatalErrorInThreadExiting = true; assertTrue(it.hasNext()); diff --git a/x-pack/plugin/analytics/build.gradle b/x-pack/plugin/analytics/build.gradle index b1ac9c87415ed..d0998aa12d757 100644 --- a/x-pack/plugin/analytics/build.gradle +++ b/x-pack/plugin/analytics/build.gradle @@ -20,4 +20,3 @@ dependencies { api 'org.apache.commons:commons-math3:3.2' } -integTest.enabled = false diff --git a/x-pack/plugin/async-search/build.gradle b/x-pack/plugin/async-search/build.gradle index 6a2f2b1b7a929..3b7e7b05e8036 100644 --- a/x-pack/plugin/async-search/build.gradle +++ b/x-pack/plugin/async-search/build.gradle @@ -29,5 +29,4 @@ dependencies { testImplementation project(path: xpackModule('async')) } -integTest.enabled = false diff --git a/x-pack/plugin/async/build.gradle b/x-pack/plugin/async/build.gradle index eb52faf0e2bde..d2c5dea299514 100644 --- a/x-pack/plugin/async/build.gradle +++ b/x-pack/plugin/async/build.gradle @@ -21,5 +21,5 @@ dependencyLicenses { tasks.named("test").configure { enabled = false } -integTest.enabled = false + diff --git a/x-pack/plugin/autoscaling/build.gradle b/x-pack/plugin/autoscaling/build.gradle index 588225fe31ed7..acab0d4202362 100644 --- a/x-pack/plugin/autoscaling/build.gradle +++ b/x-pack/plugin/autoscaling/build.gradle @@ -12,8 +12,6 @@ esplugin { } archivesBaseName = 'x-pack-autoscaling' -integTest.enabled = false - tasks.named('internalClusterTest').configure { if (BuildParams.isSnapshotBuild() == false) { systemProperty 'es.autoscaling_feature_flag_registered', 'true' diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index 1ad82e8a8e9c9..9b1cc8f105a60 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -5,17 +5,16 @@ import org.gradle.internal.jvm.Jvm import java.nio.charset.StandardCharsets -apply plugin: 'elasticsearch.testclusters' -apply plugin: 'elasticsearch.standalone-rest-test' -apply plugin: 'elasticsearch.rest-test' -apply plugin: 'elasticsearch.rest-resources' +apply plugin: 'elasticsearch.java-rest-test' +apply plugin: 'elasticsearch.yaml-rest-test' apply plugin: 'elasticsearch.validate-rest-spec' archivesBaseName = 'x-pack' dependencies { - testImplementation project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy - testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') + yamlRestTestImplementation project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy + yamlRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') + javaRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } subprojects { @@ -62,14 +61,21 @@ subprojects { configurations { testArtifacts.extendsFrom testRuntime testArtifacts.extendsFrom testImplementation + testArtifacts.extendsFrom yamlRestTestImplementation + testArtifacts.extendsFrom javaRestTestImplementation } restResources { restApi { includeCore '*' + includeXpack '*' + } + restTests { + includeXpack '*' } } +//The api and tests need to stay at src/test/... since some external tooling depends on that exact file path. artifacts { restXpackSpecs(new File(projectDir, "src/test/resources/rest-api-spec/api")) restXpackTests(new File(projectDir, "src/test/resources/rest-api-spec/test")) @@ -77,7 +83,10 @@ artifacts { def testJar = tasks.register("testJar", Jar) { appendix 'test' + duplicatesStrategy = DuplicatesStrategy.INCLUDE from sourceSets.test.output + from sourceSets.yamlRestTest.output + from sourceSets.javaRestTest.output /* * Stick the license and notice file in the jar. This isn't strictly * needed because we don't publish it but it makes our super-paranoid @@ -114,10 +123,10 @@ tasks.register("copyKeyCerts", Copy) { into keystoreDir } // Add keystores to test classpath: it expects it there -sourceSets.test.resources.srcDir(keystoreDir) -processTestResources.dependsOn("copyKeyCerts") +sourceSets.yamlRestTest.resources.srcDir(keystoreDir) +processYamlRestTestResources.dependsOn("copyKeyCerts") -integTest { +yamlRestTest { /* * We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each * other if we allow them to set the number of available processors as it's set-once in Netty. @@ -137,7 +146,7 @@ integTest { dependsOn copyKeyCerts } -testClusters.integTest { +testClusters.all { testDistribution = 'DEFAULT' // this is important since we use the reindex module in ML setting 'xpack.ml.enabled', 'true' setting 'xpack.security.enabled', 'true' diff --git a/x-pack/plugin/ccr/build.gradle b/x-pack/plugin/ccr/build.gradle index 8481a6b18c94a..82678441c48a3 100644 --- a/x-pack/plugin/ccr/build.gradle +++ b/x-pack/plugin/ccr/build.gradle @@ -10,8 +10,6 @@ esplugin { } archivesBaseName = 'x-pack-ccr' -integTest.enabled = false - // Integration Test classes that cannot run with the security manager String[] noSecurityManagerITClasses = ["**/CloseFollowerIndexIT.class"] diff --git a/x-pack/plugin/data-streams/build.gradle b/x-pack/plugin/data-streams/build.gradle index a31c7a4d61b10..d4c74add727aa 100644 --- a/x-pack/plugin/data-streams/build.gradle +++ b/x-pack/plugin/data-streams/build.gradle @@ -7,7 +7,6 @@ esplugin { extendedPlugins = ['x-pack-core'] } archivesBaseName = 'x-pack-data-streams' -integTest.enabled = false dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') diff --git a/x-pack/plugin/deprecation/build.gradle b/x-pack/plugin/deprecation/build.gradle index 96a69520a76ca..b5fc1c09895d6 100644 --- a/x-pack/plugin/deprecation/build.gradle +++ b/x-pack/plugin/deprecation/build.gradle @@ -13,4 +13,3 @@ dependencies { compileOnly project(":x-pack:plugin:core") } -integTest.enabled = false diff --git a/x-pack/plugin/enrich/build.gradle b/x-pack/plugin/enrich/build.gradle index db1ed24004727..fea9a96242f48 100644 --- a/x-pack/plugin/enrich/build.gradle +++ b/x-pack/plugin/enrich/build.gradle @@ -17,9 +17,6 @@ dependencies { testImplementation project(path: xpackModule('monitoring'), configuration: 'testArtifacts') } -// No real integ tests in the module: -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects diff --git a/x-pack/plugin/eql/build.gradle b/x-pack/plugin/eql/build.gradle index 0e17197f586f8..f7db59047d9b7 100644 --- a/x-pack/plugin/eql/build.gradle +++ b/x-pack/plugin/eql/build.gradle @@ -15,9 +15,6 @@ ext { archivesBaseName = 'x-pack-eql' -// All integration tests live in qa modules -integTest.enabled = false - dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly(project(':modules:lang-painless')) { diff --git a/x-pack/plugin/frozen-indices/build.gradle b/x-pack/plugin/frozen-indices/build.gradle index 7e8108b6616f5..afd26009e0cea 100644 --- a/x-pack/plugin/frozen-indices/build.gradle +++ b/x-pack/plugin/frozen-indices/build.gradle @@ -12,8 +12,3 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } - -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false diff --git a/x-pack/plugin/graph/build.gradle b/x-pack/plugin/graph/build.gradle index 336d6e8104984..8e894d365b535 100644 --- a/x-pack/plugin/graph/build.gradle +++ b/x-pack/plugin/graph/build.gradle @@ -22,4 +22,3 @@ gradle.projectsEvaluated { .each { check.dependsOn it.check } } -integTest.enabled = false diff --git a/x-pack/plugin/identity-provider/build.gradle b/x-pack/plugin/identity-provider/build.gradle index b3264c0b94941..f9b8a7ad53d61 100644 --- a/x-pack/plugin/identity-provider/build.gradle +++ b/x-pack/plugin/identity-provider/build.gradle @@ -359,11 +359,6 @@ internalClusterTest { } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects diff --git a/x-pack/plugin/ilm/build.gradle b/x-pack/plugin/ilm/build.gradle index e049ac7f2a2c3..aa8f3902064ce 100644 --- a/x-pack/plugin/ilm/build.gradle +++ b/x-pack/plugin/ilm/build.gradle @@ -25,4 +25,3 @@ gradle.projectsEvaluated { .each { check.dependsOn it.check } } -integTest.enabled = false diff --git a/x-pack/plugin/logstash/build.gradle b/x-pack/plugin/logstash/build.gradle index 344fccd59f803..3f872950c1a50 100644 --- a/x-pack/plugin/logstash/build.gradle +++ b/x-pack/plugin/logstash/build.gradle @@ -12,4 +12,3 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/plugin/mapper-constant-keyword/build.gradle b/x-pack/plugin/mapper-constant-keyword/build.gradle index 85109dbf0a22d..b451e82e30c0d 100644 --- a/x-pack/plugin/mapper-constant-keyword/build.gradle +++ b/x-pack/plugin/mapper-constant-keyword/build.gradle @@ -14,4 +14,3 @@ dependencies { internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/plugin/mapper-flattened/build.gradle b/x-pack/plugin/mapper-flattened/build.gradle index 46e83d5275cf0..d24e37aa32001 100644 --- a/x-pack/plugin/mapper-flattened/build.gradle +++ b/x-pack/plugin/mapper-flattened/build.gradle @@ -14,4 +14,3 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index 01a76f816c1df..cdad75e55e73e 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -96,13 +96,6 @@ project.afterEvaluate { } } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -tasks.named("integTest").configure { - enabled = false -} - def checkTask = tasks.named("check") // add all sub-projects of the qa sub-project gradle.projectsEvaluated { diff --git a/x-pack/plugin/monitoring/build.gradle b/x-pack/plugin/monitoring/build.gradle index 1a6afcb51e823..c1a233331275a 100644 --- a/x-pack/plugin/monitoring/build.gradle +++ b/x-pack/plugin/monitoring/build.gradle @@ -40,8 +40,3 @@ tasks.named("dependencyLicenses").configure { mapping from: /http.*/, to: 'httpclient' // pulled in by rest client mapping from: /commons-.*/, to: 'commons' // pulled in by rest client } - -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -tasks.named("integTest").configure { enabled = false } diff --git a/x-pack/plugin/ql/build.gradle b/x-pack/plugin/ql/build.gradle index 9a3d984a2d4a8..37140dda1ecf7 100644 --- a/x-pack/plugin/ql/build.gradle +++ b/x-pack/plugin/ql/build.gradle @@ -29,8 +29,3 @@ artifacts { archives tasks.named("jar") testArtifacts testJar } - -// disable integration tests for now -tasks.named("integTest").configure { - enabled = false -} diff --git a/x-pack/plugin/repositories-metering-api/build.gradle b/x-pack/plugin/repositories-metering-api/build.gradle index 23c911c15c760..f0ec7269764ac 100644 --- a/x-pack/plugin/repositories-metering-api/build.gradle +++ b/x-pack/plugin/repositories-metering-api/build.gradle @@ -1,5 +1,3 @@ -evaluationDependsOn(xpackModule('core')) - apply plugin: 'elasticsearch.esplugin' esplugin { name 'repositories-metering-api' @@ -14,11 +12,6 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects @@ -41,6 +34,3 @@ task testJar(type: Jar) { artifacts { testArtifacts testJar } - -test { -} diff --git a/x-pack/plugin/rollup/build.gradle b/x-pack/plugin/rollup/build.gradle index e954533d2872f..d7815ee6be717 100644 --- a/x-pack/plugin/rollup/build.gradle +++ b/x-pack/plugin/rollup/build.gradle @@ -14,4 +14,3 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/plugin/runtime-fields/build.gradle b/x-pack/plugin/runtime-fields/build.gradle index 1f44b5c019e55..6e1f92b112225 100644 --- a/x-pack/plugin/runtime-fields/build.gradle +++ b/x-pack/plugin/runtime-fields/build.gradle @@ -1,5 +1,3 @@ -evaluationDependsOn(xpackModule('core')) - apply plugin: 'elasticsearch.esplugin' esplugin { @@ -23,4 +21,3 @@ dependencyLicenses { ignoreSha 'x-pack-core' } -integTest.enabled = false diff --git a/x-pack/plugin/runtime-fields/qa/with-security/build.gradle b/x-pack/plugin/runtime-fields/qa/with-security/build.gradle index 8442e1aa7b0c2..0f622a8c44f63 100644 --- a/x-pack/plugin/runtime-fields/qa/with-security/build.gradle +++ b/x-pack/plugin/runtime-fields/qa/with-security/build.gradle @@ -1,20 +1,18 @@ -apply plugin: 'elasticsearch.testclusters' -apply plugin: 'elasticsearch.standalone-rest-test' -apply plugin: 'elasticsearch.rest-test' +apply plugin: 'elasticsearch.java-rest-test' dependencies { - testImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts') + javaRestTestImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts') } def clusterCredentials = [username: System.getProperty('tests.rest.cluster.username', 'test_admin'), password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')] -integTest { +javaRestTest { systemProperty 'tests.rest.cluster.username', clusterCredentials.username systemProperty 'tests.rest.cluster.password', clusterCredentials.password } -testClusters.integTest { +testClusters.all { testDistribution = 'DEFAULT' setting 'xpack.security.enabled', 'true' setting 'xpack.watcher.enabled', 'false' diff --git a/x-pack/plugin/runtime-fields/qa/with-security/src/test/java/org/elasticsearch/xpack/security/PermissionsIT.java b/x-pack/plugin/runtime-fields/qa/with-security/src/javaRestTest/java/org/elasticsearch/xpack/security/PermissionsIT.java similarity index 100% rename from x-pack/plugin/runtime-fields/qa/with-security/src/test/java/org/elasticsearch/xpack/security/PermissionsIT.java rename to x-pack/plugin/runtime-fields/qa/with-security/src/javaRestTest/java/org/elasticsearch/xpack/security/PermissionsIT.java diff --git a/x-pack/plugin/search-business-rules/build.gradle b/x-pack/plugin/search-business-rules/build.gradle index 4a6128c04bf2e..35fabbb7f6b44 100644 --- a/x-pack/plugin/search-business-rules/build.gradle +++ b/x-pack/plugin/search-business-rules/build.gradle @@ -9,8 +9,6 @@ esplugin { } archivesBaseName = 'x-pack-searchbusinessrules' -integTest.enabled = false - dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') diff --git a/x-pack/plugin/searchable-snapshots/build.gradle b/x-pack/plugin/searchable-snapshots/build.gradle index 34111a37a149d..eb56c86d9066d 100644 --- a/x-pack/plugin/searchable-snapshots/build.gradle +++ b/x-pack/plugin/searchable-snapshots/build.gradle @@ -15,11 +15,6 @@ dependencies { internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects @@ -43,7 +38,7 @@ artifacts { testArtifacts testJar } -testClusters.integTest { +testClusters.all { if (BuildParams.isSnapshotBuild() == false) { systemProperty 'es.searchable_snapshots_feature_enabled', 'true' } diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 26d6b2c318359..a398b0940a267 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -486,11 +486,6 @@ internalClusterTest { systemProperty 'es.transport.buffer.size', '256k' } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects diff --git a/x-pack/plugin/sql/build.gradle b/x-pack/plugin/sql/build.gradle index 4f9a1746d4eea..be1be551ab796 100644 --- a/x-pack/plugin/sql/build.gradle +++ b/x-pack/plugin/sql/build.gradle @@ -25,9 +25,6 @@ configurations { archivesBaseName = 'x-pack-sql' -// All integration tests live in qa modules -integTest.enabled = false - dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly(project(':modules:lang-painless')) { diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/CatIndicesWithSecurityIT.java b/x-pack/plugin/src/javaRestTest/java/org/elasticsearch/xpack/test/rest/CatIndicesWithSecurityIT.java similarity index 100% rename from x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/CatIndicesWithSecurityIT.java rename to x-pack/plugin/src/javaRestTest/java/org/elasticsearch/xpack/test/rest/CatIndicesWithSecurityIT.java diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java b/x-pack/plugin/src/yamlRestTest/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java similarity index 98% rename from x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java rename to x-pack/plugin/src/yamlRestTest/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java index ec229b9810233..d2474cd9bf824 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java +++ b/x-pack/plugin/src/yamlRestTest/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java @@ -65,7 +65,7 @@ public XPackRestIT(ClientYamlTestCandidate testCandidate) { @ParametersFactory public static Iterable parameters() throws Exception { - return ESClientYamlSuiteTestCase.createParameters(); + return createParameters(); } @Override @@ -211,7 +211,7 @@ public void cleanup() throws Exception { if (isWaitForPendingTasks()) { // This waits for pending tasks to complete, so must go last (otherwise // it could be waiting for pending tasks while monitoring is still running). - ESRestTestCase.waitForPendingTasks(adminClient(), task -> { + waitForPendingTasks(adminClient(), task -> { // Don't check rollup jobs because we clear them in the superclass. return task.contains(RollupJob.NAME); }); diff --git a/x-pack/plugin/stack/build.gradle b/x-pack/plugin/stack/build.gradle index 08b51fb94af3d..ae3aaa6d5357d 100644 --- a/x-pack/plugin/stack/build.gradle +++ b/x-pack/plugin/stack/build.gradle @@ -24,4 +24,3 @@ gradle.projectsEvaluated { .each { check.dependsOn it.check } } -integTest.enabled = false diff --git a/x-pack/plugin/transform/build.gradle b/x-pack/plugin/transform/build.gradle index 988d1cf6e9a49..dcd4a79163d48 100644 --- a/x-pack/plugin/transform/build.gradle +++ b/x-pack/plugin/transform/build.gradle @@ -16,11 +16,6 @@ dependencies { testImplementation project(path: ':modules:aggs-matrix-stats') } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects diff --git a/x-pack/plugin/vectors/build.gradle b/x-pack/plugin/vectors/build.gradle index ffaf25c4945e9..f5e45206d7d03 100644 --- a/x-pack/plugin/vectors/build.gradle +++ b/x-pack/plugin/vectors/build.gradle @@ -15,4 +15,3 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/plugin/voting-only-node/build.gradle b/x-pack/plugin/voting-only-node/build.gradle index 1bbe42bc426dc..0f80823699639 100644 --- a/x-pack/plugin/voting-only-node/build.gradle +++ b/x-pack/plugin/voting-only-node/build.gradle @@ -11,8 +11,3 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } - -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false diff --git a/x-pack/plugin/watcher/build.gradle b/x-pack/plugin/watcher/build.gradle index b19c5c73ee96f..25a119c0639f4 100644 --- a/x-pack/plugin/watcher/build.gradle +++ b/x-pack/plugin/watcher/build.gradle @@ -131,11 +131,6 @@ internalClusterTest { systemProperty 'es.set.netty.runtime.available.processors', 'false' } -// xpack modules are installed in real clusters as the meta plugin, so -// installing them as individual plugins for integ tests doesn't make sense, -// so we disable integ tests -integTest.enabled = false - // add all sub-projects of the qa sub-project gradle.projectsEvaluated { project.subprojects diff --git a/x-pack/plugin/wildcard/build.gradle b/x-pack/plugin/wildcard/build.gradle index 5565f36f166d8..814615322707a 100644 --- a/x-pack/plugin/wildcard/build.gradle +++ b/x-pack/plugin/wildcard/build.gradle @@ -13,4 +13,3 @@ dependencies { testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') } -integTest.enabled = false diff --git a/x-pack/qa/security-example-spi-extension/build.gradle b/x-pack/qa/security-example-spi-extension/build.gradle index 388be5ccb2964..0f337760c88fb 100644 --- a/x-pack/qa/security-example-spi-extension/build.gradle +++ b/x-pack/qa/security-example-spi-extension/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'elasticsearch.testclusters' +apply plugin: 'elasticsearch.java-rest-test' apply plugin: 'elasticsearch.esplugin' esplugin { @@ -10,16 +10,19 @@ esplugin { dependencies { compileOnly project(':x-pack:plugin:core') - testImplementation project(xpackProject('transport-client').path) + javaRestTestImplementation project(xpackProject('transport-client').path) + javaRestTestImplementation project(':x-pack:plugin:core') + javaRestTestImplementation project(':client:rest-high-level') + // let the javaRestTest see the classpath of main + javaRestTestImplementation project.sourceSets.main.runtimeClasspath + } -integTest { - dependsOn buildZip +javaRestTest { systemProperty 'tests.security.manager', 'false' } - -testClusters.integTest { +testClusters.all { // This is important, so that all the modules are available too. // There are index templates that use token filters that are in analysis-module and // processors are being used that are in ingest-common module. diff --git a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java b/x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/realm/CustomRealmIT.java similarity index 100% rename from x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRealmIT.java rename to x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/realm/CustomRealmIT.java diff --git a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java b/x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java similarity index 95% rename from x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java rename to x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java index 0b8eabf0b1c7c..02f2bdc0d0d80 100644 --- a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java +++ b/x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/realm/CustomRoleMappingRealmIT.java @@ -11,6 +11,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.rest.ESRestTestCase; +import org.hamcrest.Matchers; import org.junit.Before; import java.util.Collections; @@ -19,7 +20,6 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.is; /** * Integration test to test authentication with the custom role-mapping realm @@ -62,7 +62,7 @@ public void testUserWithRoleMapping() throws Exception { final Response response = client().performRequest(request); final Map authenticate = entityAsMap(response); - assertThat(authenticate.get("username"), is(CustomRoleMappingRealm.USERNAME)); + assertThat(authenticate.get("username"), Matchers.is(CustomRoleMappingRealm.USERNAME)); assertThat(authenticate.get("roles"), instanceOf(List.class)); assertThat(authenticate.get("roles"), equalTo(Collections.singletonList(expectedRole))); } diff --git a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java b/x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/role/CustomRolesProviderIT.java similarity index 95% rename from x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java rename to x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/role/CustomRolesProviderIT.java index 57a895848e3a8..c203ff24236d0 100644 --- a/x-pack/qa/security-example-spi-extension/src/test/java/org/elasticsearch/example/role/CustomRolesProviderIT.java +++ b/x-pack/qa/security-example-spi-extension/src/javaRestTest/java/org/elasticsearch/example/role/CustomRolesProviderIT.java @@ -27,7 +27,6 @@ import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.INDEX; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_A; import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_B; -import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue; import static org.hamcrest.Matchers.is; /** @@ -41,7 +40,7 @@ public class CustomRolesProviderIT extends ESIntegTestCase { static { RequestOptions.Builder options = RequestOptions.DEFAULT.toBuilder(); options.addHeader(UsernamePasswordToken.BASIC_AUTH_HEADER, - basicAuthHeaderValue(TEST_USER, new SecureString(TEST_PWD.toCharArray()))); + UsernamePasswordToken.basicAuthHeaderValue(TEST_USER, new SecureString(TEST_PWD.toCharArray()))); AUTH_OPTIONS = options.build(); } From 5d24193ae5a74eccfd3eaa6709332d2a23000a0d Mon Sep 17 00:00:00 2001 From: Jake Landis Date: Wed, 9 Sep 2020 13:21:37 -0500 Subject: [PATCH 2/2] fix merge issue --- .../qa/die_with_dignity/DieWithDignityIT.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java b/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java index 07a3e31f7d639..194c20247a17d 100644 --- a/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java +++ b/qa/die-with-dignity/src/javaRestTest/java/org/elasticsearch/qa/die_with_dignity/DieWithDignityIT.java @@ -67,10 +67,9 @@ public void testDieWithDignity() throws Exception { try { while (it.hasNext() && (fatalError == false || fatalErrorInThreadExiting == false)) { final String line = it.next(); - if (containsAll(line, ".*ERROR.*", ".*ExceptionsHelper.*", ".*javaRestTest-0.*", ".*fatal error.*")) { + if (line.matches(".*ERROR.*o\\.e\\.ExceptionsHelper.*javaRestTest-0.*fatal error.*")) { fatalError = true; } else if (line.matches(".*ERROR.*o\\.e\\.b\\.ElasticsearchUncaughtExceptionHandler.*javaRestTest-0.*" - ".*integTest-0.*", + "fatal error in thread \\[Thread-\\d+\\], exiting.*")) { fatalErrorInThreadExiting = true; assertTrue(it.hasNext()); @@ -88,6 +87,15 @@ public void testDieWithDignity() throws Exception { } } + private boolean containsAll(String line, String... subStrings) { + for (String subString : subStrings) { + if (line.matches(subString) == false) { + return false; + } + } + return true; + } + private void debugLogs(Path path) throws IOException { try (BufferedReader reader = Files.newBufferedReader(path)) { reader.lines().forEach(line -> logger.info(line));