Skip to content

Commit ded7407

Browse files
author
Hendrik Muhs
authored
[Transform] Adapt tests for error message to 7.x format
adapt messages to 7.x format (elastic#51398) fixes elastic#51360
1 parent 2f7c240 commit ded7407

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformTaskFailedStateIT.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public void cleanUpPotentiallyFailedTransform() throws Exception {
6262
}
6363
}
6464

65-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360")
6665
public void testForceStopFailedTransform() throws Exception {
6766
String transformId = "test-force-stop-failed-transform";
6867
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
@@ -74,10 +73,10 @@ public void testForceStopFailedTransform() throws Exception {
7473
awaitState(transformId, TransformStats.State.FAILED);
7574
Map<?, ?> fullState = getTransformStateAndStats(transformId);
7675
final String failureReason = "Failed to index documents into destination index due to permanent error: "
77-
+ "\\[org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced \\[7\\] "
76+
+ "\\[BulkIndexingException\\[Bulk index experienced \\[7\\] "
7877
+ "failures and at least 1 irrecoverable "
79-
+ "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are "
80-
+ "incompatible with the transform configuration.;.*";
78+
+ "\\[TransformException\\[Destination index mappings are "
79+
+ "incompatible with the transform configuration.\\];.*";
8180
// Verify we have failed for the expected reason
8281
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
8382

@@ -101,7 +100,6 @@ public void testForceStopFailedTransform() throws Exception {
101100
assertThat(XContentMapValues.extractValue("reason", fullState), is(nullValue()));
102101
}
103102

104-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360")
105103
public void testStartFailedTransform() throws Exception {
106104
String transformId = "test-force-start-failed-transform";
107105
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
@@ -113,10 +111,10 @@ public void testStartFailedTransform() throws Exception {
113111
awaitState(transformId, TransformStats.State.FAILED);
114112
Map<?, ?> fullState = getTransformStateAndStats(transformId);
115113
final String failureReason = "Failed to index documents into destination index due to permanent error: "
116-
+ "\\[org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced \\[7\\] "
114+
+ "\\[BulkIndexingException\\[Bulk index experienced \\[7\\] "
117115
+ "failures and at least 1 irrecoverable "
118-
+ "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are "
119-
+ "incompatible with the transform configuration.;.*";
116+
+ "\\[TransformException\\[Destination index mappings are "
117+
+ "incompatible with the transform configuration.\\];.*";
120118
// Verify we have failed for the expected reason
121119
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
122120

0 commit comments

Comments
 (0)