Skip to content

[Transform] Adapt tests for error message to 7.x format #51398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public void cleanUpPotentiallyFailedTransform() throws Exception {
}
}

@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);
Expand All @@ -74,10 +73,10 @@ public void testForceStopFailedTransform() throws Exception {
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));

Expand All @@ -101,7 +100,6 @@ public void testForceStopFailedTransform() throws Exception {
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);
Expand All @@ -113,10 +111,10 @@ public void testStartFailedTransform() throws Exception {
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));

Expand Down