mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
[Transform] Adapt tests for error message to 7.x format
adapt messages to 7.x format (#51398) fixes #51360
This commit is contained in:
parent
2f7c240184
commit
ded7407b4d
@ -62,7 +62,6 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360")
|
|
||||||
public void testForceStopFailedTransform() throws Exception {
|
public void testForceStopFailedTransform() throws Exception {
|
||||||
String transformId = "test-force-stop-failed-transform";
|
String transformId = "test-force-stop-failed-transform";
|
||||||
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
|
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
|
||||||
@ -74,10 +73,10 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase {
|
|||||||
awaitState(transformId, TransformStats.State.FAILED);
|
awaitState(transformId, TransformStats.State.FAILED);
|
||||||
Map<?, ?> fullState = getTransformStateAndStats(transformId);
|
Map<?, ?> fullState = getTransformStateAndStats(transformId);
|
||||||
final String failureReason = "Failed to index documents into destination index due to permanent error: "
|
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 "
|
+ "failures and at least 1 irrecoverable "
|
||||||
+ "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are "
|
+ "\\[TransformException\\[Destination index mappings are "
|
||||||
+ "incompatible with the transform configuration.;.*";
|
+ "incompatible with the transform configuration.\\];.*";
|
||||||
// Verify we have failed for the expected reason
|
// Verify we have failed for the expected reason
|
||||||
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
|
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
|
||||||
|
|
||||||
@ -101,7 +100,6 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase {
|
|||||||
assertThat(XContentMapValues.extractValue("reason", fullState), is(nullValue()));
|
assertThat(XContentMapValues.extractValue("reason", fullState), is(nullValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/51360")
|
|
||||||
public void testStartFailedTransform() throws Exception {
|
public void testStartFailedTransform() throws Exception {
|
||||||
String transformId = "test-force-start-failed-transform";
|
String transformId = "test-force-start-failed-transform";
|
||||||
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
|
createReviewsIndex(REVIEWS_INDEX_NAME, 10);
|
||||||
@ -113,10 +111,10 @@ public class TransformTaskFailedStateIT extends TransformRestTestCase {
|
|||||||
awaitState(transformId, TransformStats.State.FAILED);
|
awaitState(transformId, TransformStats.State.FAILED);
|
||||||
Map<?, ?> fullState = getTransformStateAndStats(transformId);
|
Map<?, ?> fullState = getTransformStateAndStats(transformId);
|
||||||
final String failureReason = "Failed to index documents into destination index due to permanent error: "
|
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 "
|
+ "failures and at least 1 irrecoverable "
|
||||||
+ "\\[org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are "
|
+ "\\[TransformException\\[Destination index mappings are "
|
||||||
+ "incompatible with the transform configuration.;.*";
|
+ "incompatible with the transform configuration.\\];.*";
|
||||||
// Verify we have failed for the expected reason
|
// Verify we have failed for the expected reason
|
||||||
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
|
assertThat((String) XContentMapValues.extractValue("reason", fullState), matchesRegex(failureReason));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user