Mute multiple tests on Windows (7.x) (#44676)

* Mute failing test

tracked in #44552

* mute EvilSecurityTests

tracking in #44558

* Fix line endings in ESJsonLayoutTests

* Mute failing ForecastIT  test on windows

Tracking in #44609

* mute BasicRenormalizationIT.testDefaultRenormalization

tracked in #44613

* fix mute testDefaultRenormalization

* Increase busyWait timeout windows is slow

* Mute failure unconfigured node name

* mute x-pack internal cluster test windows

tracking #44610

* Mute JvmErgonomicsTests on windows

Tracking #44669

* mute SharedClusterSnapshotRestoreIT testParallelRestoreOperationsFromSingleSnapshot

Tracking #44671

* Mute NodeTests on Windows

Tracking #44256
This commit is contained in:
Alpar Torok 2019-07-22 11:32:29 +03:00 committed by GitHub
parent d82a570a2a
commit b34ac66d96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 35 additions and 4 deletions

View File

@ -19,6 +19,8 @@
package org.elasticsearch.tools.launchers; package org.elasticsearch.tools.launchers;
import org.junit.Before;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -41,6 +43,13 @@ import static org.junit.Assert.fail;
public class JvmErgonomicsTests extends LaunchersTestCase { public class JvmErgonomicsTests extends LaunchersTestCase {
@Before
public void setUp() {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44669",
System.getProperty("os.name").contains("Win")
);
}
public void testExtractValidHeapSizeUsingXmx() throws InterruptedException, IOException { public void testExtractValidHeapSizeUsingXmx() throws InterruptedException, IOException {
assertThat( assertThat(
JvmErgonomics.extractHeapSize(JvmErgonomics.finalJvmOptions(Collections.singletonList("-Xmx2g"))), JvmErgonomics.extractHeapSize(JvmErgonomics.finalJvmOptions(Collections.singletonList("-Xmx2g"))),

View File

@ -55,6 +55,9 @@ public class GeoIpProcessorFactoryTests extends ESTestCase {
@BeforeClass @BeforeClass
public static void loadDatabaseReaders() throws IOException { public static void loadDatabaseReaders() throws IOException {
// there are still problems on windows
assumeFalse("https://github.com/elastic/elasticsearch/issues/44552", Constants.WINDOWS);
// Skip setup because Windows cannot cleanup these files properly. The reason is that they are using // Skip setup because Windows cannot cleanup these files properly. The reason is that they are using
// a MappedByteBuffer which will keep the file mappings active until it is garbage-collected. As a consequence, // a MappedByteBuffer which will keep the file mappings active until it is garbage-collected. As a consequence,
// the corresponding file appears to be still in use and Windows cannot delete it. // the corresponding file appears to be still in use and Windows cannot delete it.

View File

@ -136,6 +136,7 @@ public class EvilSecurityTests extends ESTestCase {
} }
public void testDuplicateDataPaths() throws IOException { public void testDuplicateDataPaths() throws IOException {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44558", Constants.WINDOWS);
final Path path = createTempDir(); final Path path = createTempDir();
final Path home = path.resolve("home"); final Path home = path.resolve("home");
final Path data = path.resolve("data"); final Path data = path.resolve("data");

View File

@ -50,7 +50,7 @@ public class ESJsonLayoutTests extends ESTestCase {
"\"node.name\": \"%node_name\", " + "\"node.name\": \"%node_name\", " +
"\"message\": \"%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}\"" + "\"message\": \"%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}\"" +
"%notEmpty{, %node_and_cluster_id }" + "%notEmpty{, %node_and_cluster_id }" +
"%exceptionAsJson }\n")); "%exceptionAsJson }" + System.lineSeparator()));
} }
public void testLayoutWithAdditionalFields() { public void testLayoutWithAdditionalFields() {
@ -72,7 +72,7 @@ public class ESJsonLayoutTests extends ESTestCase {
"%notEmpty{, \"x-opaque-id\": \"%ESMessageField{x-opaque-id}\"}" + "%notEmpty{, \"x-opaque-id\": \"%ESMessageField{x-opaque-id}\"}" +
"%notEmpty{, \"someOtherField\": \"%ESMessageField{someOtherField}\"}" + "%notEmpty{, \"someOtherField\": \"%ESMessageField{someOtherField}\"}" +
"%notEmpty{, %node_and_cluster_id }" + "%notEmpty{, %node_and_cluster_id }" +
"%exceptionAsJson }\n")); "%exceptionAsJson }" + System.lineSeparator()));
} }
public void testLayoutWithAdditionalFieldOverride() { public void testLayoutWithAdditionalFieldOverride() {
@ -92,6 +92,6 @@ public class ESJsonLayoutTests extends ESTestCase {
"\"node.name\": \"%node_name\"" + "\"node.name\": \"%node_name\"" +
"%notEmpty{, \"message\": \"%ESMessageField{message}\"}" + "%notEmpty{, \"message\": \"%ESMessageField{message}\"}" +
"%notEmpty{, %node_and_cluster_id }" + "%notEmpty{, %node_and_cluster_id }" +
"%exceptionAsJson }\n")); "%exceptionAsJson }" + System.lineSeparator()));
} }
} }

View File

@ -1,3 +1,5 @@
import org.elasticsearch.gradle.OS
/* /*
* Licensed to Elasticsearch under one or more contributor * Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with * license agreements. See the NOTICE file distributed with
@ -28,4 +30,6 @@ testClusters.integTest {
integTest.runner { integTest.runner {
nonInputProperties.systemProperty 'tests.logfile', nonInputProperties.systemProperty 'tests.logfile',
"${ -> testClusters.integTest.singleNode().getServerLog() }" "${ -> testClusters.integTest.singleNode().getServerLog() }"
// https://github.com/elastic/elasticsearch/issues/44656
onlyIf { OS.WINDOWS.equals(OS.current()) == false }
} }

View File

@ -18,6 +18,7 @@
*/ */
package org.elasticsearch.node; package org.elasticsearch.node;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.bootstrap.BootstrapCheck; import org.elasticsearch.bootstrap.BootstrapCheck;
import org.elasticsearch.bootstrap.BootstrapContext; import org.elasticsearch.bootstrap.BootstrapContext;
@ -149,6 +150,7 @@ public class NodeTests extends ESTestCase {
} }
public void testCloseOnOutstandingTask() throws Exception { public void testCloseOnOutstandingTask() throws Exception {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44256", Constants.WINDOWS);
Node node = new MockNode(baseSettings().build(), basePlugins()); Node node = new MockNode(baseSettings().build(), basePlugins());
node.start(); node.start();
ThreadPool threadpool = node.injector().getInstance(ThreadPool.class); ThreadPool threadpool = node.injector().getInstance(ThreadPool.class);

View File

@ -338,7 +338,7 @@ public class TestPersistentTasksPlugin extends Plugin implements ActionPlugin, P
assertTrue(awaitBusy(() -> testTask.isCancelled() || assertTrue(awaitBusy(() -> testTask.isCancelled() ||
testTask.getOperation() != null || testTask.getOperation() != null ||
clusterService.lifecycleState() != Lifecycle.State.STARTED, // speedup finishing on closed nodes clusterService.lifecycleState() != Lifecycle.State.STARTED, // speedup finishing on closed nodes
30, TimeUnit.SECONDS)); // This can take a while during large cluster restart 45, TimeUnit.SECONDS)); // This can take a while during large cluster restart
if (clusterService.lifecycleState() != Lifecycle.State.STARTED) { if (clusterService.lifecycleState() != Lifecycle.State.STARTED) {
return; return;
} }

View File

@ -19,6 +19,7 @@
package org.elasticsearch.snapshots; package org.elasticsearch.snapshots;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.SetOnce; import org.apache.lucene.util.SetOnce;
import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.ExceptionsHelper;
@ -3404,6 +3405,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
} }
public void testSnapshotStatusOnFailedIndex() throws Exception { public void testSnapshotStatusOnFailedIndex() throws Exception {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44671", Constants.WINDOWS);
logger.info("--> creating repository"); logger.info("--> creating repository");
final Path repoPath = randomRepoPath(); final Path repoPath = randomRepoPath();
final Client client = client(); final Client client = client();

View File

@ -1,3 +1,5 @@
import org.elasticsearch.gradle.OS
evaluationDependsOn(xpackModule('core')) evaluationDependsOn(xpackModule('core'))
apply plugin: 'elasticsearch.esplugin' apply plugin: 'elasticsearch.esplugin'
@ -22,6 +24,8 @@ task internalClusterTestNoSecurityManager(type: Test) {
include noSecurityManagerITClasses include noSecurityManagerITClasses
systemProperty 'es.set.netty.runtime.available.processors', 'false' systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'tests.security.manager', 'false' systemProperty 'tests.security.manager', 'false'
// Disable tests on windows https://github.com/elastic/elasticsearch/issues/44610
onlyIf { OS.WINDOWS.equals(OS.current()) == false }
} }
// Instead we create a separate task to run the // Instead we create a separate task to run the
@ -34,6 +38,8 @@ task internalClusterTest(type: Test) {
include '**/*IT.class' include '**/*IT.class'
exclude noSecurityManagerITClasses exclude noSecurityManagerITClasses
systemProperty 'es.set.netty.runtime.available.processors', 'false' systemProperty 'es.set.netty.runtime.available.processors', 'false'
// Disable tests on windows https://github.com/elastic/elasticsearch/issues/44610
onlyIf { OS.WINDOWS.equals(OS.current()) == false }
} }
check.dependsOn internalClusterTest check.dependsOn internalClusterTest

View File

@ -5,6 +5,7 @@
*/ */
package org.elasticsearch.xpack.ml.integration; package org.elasticsearch.xpack.ml.integration;
import org.apache.lucene.util.Constants;
import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.xpack.core.ml.action.GetRecordsAction; import org.elasticsearch.xpack.core.ml.action.GetRecordsAction;
import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig; import org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig;
@ -32,6 +33,7 @@ public class BasicRenormalizationIT extends MlNativeAutodetectIntegTestCase {
} }
public void testDefaultRenormalization() throws Exception { public void testDefaultRenormalization() throws Exception {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44613", Constants.WINDOWS);
String jobId = "basic-renormalization-it-test-default-renormalization-job"; String jobId = "basic-renormalization-it-test-default-renormalization-job";
createAndRunJob(jobId, null); createAndRunJob(jobId, null);

View File

@ -5,6 +5,7 @@
*/ */
package org.elasticsearch.xpack.ml.integration; package org.elasticsearch.xpack.ml.integration;
import org.apache.lucene.util.Constants;
import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchStatusException; import org.elasticsearch.ElasticsearchStatusException;
import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.action.support.master.AcknowledgedResponse;
@ -211,6 +212,7 @@ public class ForecastIT extends MlNativeAutodetectIntegTestCase {
} }
public void testOverflowToDisk() throws Exception { public void testOverflowToDisk() throws Exception {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44609", Constants.WINDOWS);
Detector.Builder detector = new Detector.Builder("mean", "value"); Detector.Builder detector = new Detector.Builder("mean", "value");
detector.setByFieldName("clientIP"); detector.setByFieldName("clientIP");