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;
import org.junit.Before;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
@ -41,6 +43,13 @@ import static org.junit.Assert.fail;
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 {
assertThat(
JvmErgonomics.extractHeapSize(JvmErgonomics.finalJvmOptions(Collections.singletonList("-Xmx2g"))),

View File

@ -55,6 +55,9 @@ public class GeoIpProcessorFactoryTests extends ESTestCase {
@BeforeClass
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
// 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.

View File

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

View File

@ -50,7 +50,7 @@ public class ESJsonLayoutTests extends ESTestCase {
"\"node.name\": \"%node_name\", " +
"\"message\": \"%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}\"" +
"%notEmpty{, %node_and_cluster_id }" +
"%exceptionAsJson }\n"));
"%exceptionAsJson }" + System.lineSeparator()));
}
public void testLayoutWithAdditionalFields() {
@ -72,7 +72,7 @@ public class ESJsonLayoutTests extends ESTestCase {
"%notEmpty{, \"x-opaque-id\": \"%ESMessageField{x-opaque-id}\"}" +
"%notEmpty{, \"someOtherField\": \"%ESMessageField{someOtherField}\"}" +
"%notEmpty{, %node_and_cluster_id }" +
"%exceptionAsJson }\n"));
"%exceptionAsJson }" + System.lineSeparator()));
}
public void testLayoutWithAdditionalFieldOverride() {
@ -92,6 +92,6 @@ public class ESJsonLayoutTests extends ESTestCase {
"\"node.name\": \"%node_name\"" +
"%notEmpty{, \"message\": \"%ESMessageField{message}\"}" +
"%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
* license agreements. See the NOTICE file distributed with
@ -28,4 +30,6 @@ testClusters.integTest {
integTest.runner {
nonInputProperties.systemProperty 'tests.logfile',
"${ -> 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;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.bootstrap.BootstrapCheck;
import org.elasticsearch.bootstrap.BootstrapContext;
@ -149,6 +150,7 @@ public class NodeTests extends ESTestCase {
}
public void testCloseOnOutstandingTask() throws Exception {
assumeFalse("https://github.com/elastic/elasticsearch/issues/44256", Constants.WINDOWS);
Node node = new MockNode(baseSettings().build(), basePlugins());
node.start();
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() ||
testTask.getOperation() != null ||
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) {
return;
}

View File

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

View File

@ -1,3 +1,5 @@
import org.elasticsearch.gradle.OS
evaluationDependsOn(xpackModule('core'))
apply plugin: 'elasticsearch.esplugin'
@ -22,6 +24,8 @@ task internalClusterTestNoSecurityManager(type: Test) {
include noSecurityManagerITClasses
systemProperty 'es.set.netty.runtime.available.processors', '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
@ -34,6 +38,8 @@ task internalClusterTest(type: Test) {
include '**/*IT.class'
exclude noSecurityManagerITClasses
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

View File

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

View File

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