From ded7407b4dca05afde8795447d8f3c12d70a7c9b Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Fri, 24 Jan 2020 12:17:32 +0100 Subject: [PATCH] [Transform] Adapt tests for error message to 7.x format adapt messages to 7.x format (#51398) fixes #51360 --- .../integration/TransformTaskFailedStateIT.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformTaskFailedStateIT.java b/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformTaskFailedStateIT.java index 7a1845b374f..ffb4d994c41 100644 --- a/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformTaskFailedStateIT.java +++ b/x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformTaskFailedStateIT.java @@ -62,7 +62,6 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase { } } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360") public void testForceStopFailedTransform() throws Exception { String transformId = "test-force-stop-failed-transform"; createReviewsIndex(REVIEWS_INDEX_NAME, 10); @@ -74,10 +73,10 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase { awaitState(transformId, TransformStats.State.FAILED); Map fullState = getTransformStateAndStats(transformId); final String failureReason = "Failed to index documents into destination index due to permanent error: " - + "\\[org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced \\[7\\] " + + "\\[BulkIndexingException\\[Bulk index experienced \\[7\\] " + "failures and at least 1 irrecoverable " - + "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are " - + "incompatible with the transform configuration.;.*"; + + "\\[TransformException\\[Destination index mappings are " + + "incompatible with the transform configuration.\\];.*"; // Verify we have failed for the expected reason assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason)); @@ -101,7 +100,6 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase { assertThat(XContentMapValues.extractValue("reason", fullState), is(nullValue())); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360") public void testStartFailedTransform() throws Exception { String transformId = "test-force-start-failed-transform"; createReviewsIndex(REVIEWS_INDEX_NAME, 10); @@ -113,10 +111,10 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase { awaitState(transformId, TransformStats.State.FAILED); Map fullState = getTransformStateAndStats(transformId); final String failureReason = "Failed to index documents into destination index due to permanent error: " - + "\\[org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced \\[7\\] " + + "\\[BulkIndexingException\\[Bulk index experienced \\[7\\] " + "failures and at least 1 irrecoverable " - + "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are " - + "incompatible with the transform configuration.;.*"; + + "\\[TransformException\\[Destination index mappings are " + + "incompatible with the transform configuration.\\];.*"; // Verify we have failed for the expected reason assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));