From 93f6518e7ec030a1b0911b27c69b1d07f2c6f1c6 Mon Sep 17 00:00:00 2001 From: Valeriy Khakhutskyy <1292899+valeriy42@users.noreply.github.com> Date: Tue, 26 Jan 2021 12:15:37 +0100 Subject: [PATCH] [7.11][ML] Unmute RegressionIT.testSingleNumericFeatureAndMixedTrainingAndNonTrainingRows (#67966) Besides unmuting the test I added debug-level logging to facilitate finding the root cause of the test failure. Backport of #67904. --- .../xpack/ml/integration/RegressionIT.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java index 46bb24d9a50d5..cd2cbd6556bde 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/RegressionIT.java @@ -37,12 +37,12 @@ import org.elasticsearch.xpack.core.ml.inference.preprocessing.OneHotEncoding; import org.elasticsearch.xpack.core.ml.inference.preprocessing.PreProcessor; import org.junit.After; +import org.junit.Before; import java.io.IOException; import java.time.Instant; import java.util.Arrays; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -72,9 +72,23 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase { private String sourceIndex; private String destIndex; + @Before + public void setupLogging() { + client().admin().cluster() + .prepareUpdateSettings() + .setTransientSettings(Settings.builder() + .put("logger.org.elasticsearch.xpack.ml.process.logging.CppLogMessageHandler", "DEBUG")) + .get(); + } + @After public void cleanup() { cleanUp(); + client().admin().cluster() + .prepareUpdateSettings() + .setTransientSettings(Settings.builder() + .putNull("logger.org.elasticsearch.xpack.ml.process.logging.CppLogMessageHandler")) + .get(); } @Override @@ -86,7 +100,6 @@ protected NamedXContentRegistry xContentRegistry() { return new NamedXContentRegistry(entries); } - @AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/59413") public void testSingleNumericFeatureAndMixedTrainingAndNonTrainingRows() throws Exception { initialize("regression_single_numeric_feature_and_mixed_data_set"); String predictedClassField = DEPENDENT_VARIABLE_FIELD + "_prediction";