|
35 | 35 | import static org.elasticsearch.xpack.test.rest.XPackRestTestConstants.TRANSFORM_INTERNAL_INDEX_PREFIX;
|
36 | 36 | import static org.elasticsearch.xpack.test.rest.XPackRestTestConstants.TRANSFORM_INTERNAL_INDEX_PREFIX_DEPRECATED;
|
37 | 37 | import static org.elasticsearch.xpack.test.rest.XPackRestTestConstants.TRANSFORM_TASK_NAME;
|
38 |
| -import static org.hamcrest.Matchers.containsString; |
39 | 38 | import static org.hamcrest.Matchers.equalTo;
|
40 | 39 | import static org.hamcrest.Matchers.greaterThan;
|
41 | 40 | import static org.hamcrest.Matchers.greaterThanOrEqualTo;
|
@@ -96,7 +95,6 @@ public void testTransformRollingUpgrade() throws Exception {
|
96 | 95 | lastCheckpoint = 2;
|
97 | 96 | }
|
98 | 97 | verifyContinuousTransformHandlesData(lastCheckpoint);
|
99 |
| - verifyUpgradeFailsIfMixedCluster(); |
100 | 98 | }
|
101 | 99 | case UPGRADED -> {
|
102 | 100 | client().performRequest(waitForYellow);
|
@@ -131,11 +129,11 @@ private void createAndStartContinuousTransform() throws Exception {
|
131 | 129 |
|
132 | 130 | assertBusy(() -> {
|
133 | 131 | var stateAndStats = getTransformStats(CONTINUOUS_TRANSFORM_ID);
|
| 132 | + assertThat((Integer) XContentMapValues.extractValue("stats.documents_indexed", stateAndStats), equalTo(ENTITIES.size())); |
134 | 133 | assertThat(
|
135 |
| - ((Integer) XContentMapValues.extractValue("stats.documents_indexed", stateAndStats)).longValue(), |
136 |
| - equalTo(ENTITIES.size()) |
| 134 | + ((Integer) XContentMapValues.extractValue("stats.documents_processed", stateAndStats)).longValue(), |
| 135 | + equalTo(totalDocsWritten) |
137 | 136 | );
|
138 |
| - assertThat((Integer) XContentMapValues.extractValue("stats.documents_processed", stateAndStats), equalTo(totalDocsWritten)); |
139 | 137 | // Even if we get back to started, we may periodically get set back to `indexing` when triggered.
|
140 | 138 | // Though short lived due to no changes on the source indices, it could result in flaky test behavior
|
141 | 139 | assertThat(stateAndStats.get("state"), oneOf("started", "indexing"));
|
@@ -232,17 +230,6 @@ private void verifyContinuousTransformHandlesData(long expectedLastCheckpoint) t
|
232 | 230 | });
|
233 | 231 | }
|
234 | 232 |
|
235 |
| - private void verifyUpgradeFailsIfMixedCluster() { |
236 |
| - // upgrade tests by design are also executed with the same version, this check must be skipped in this case, see gh#39102. |
237 |
| - if (isOriginalClusterCurrent()) { |
238 |
| - return; |
239 |
| - } |
240 |
| - final Request upgradeTransformRequest = new Request("POST", getTransformEndpoint() + "_upgrade"); |
241 |
| - |
242 |
| - Exception ex = expectThrows(Exception.class, () -> client().performRequest(upgradeTransformRequest)); |
243 |
| - assertThat(ex.getMessage(), containsString("All nodes must be the same version")); |
244 |
| - } |
245 |
| - |
246 | 233 | private void verifyUpgrade() throws IOException {
|
247 | 234 | final Request upgradeTransformRequest = new Request("POST", getTransformEndpoint() + "_upgrade");
|
248 | 235 | Response response = client().performRequest(upgradeTransformRequest);
|
|
0 commit comments