1
0
Эх сурвалжийг харах

Unmute testCreateAndRestoreSearchableSnapshot and add more context to assert (#127131)

See #119709.
Oleksandr Kolomiiets 6 сар өмнө
parent
commit
987e9f7595

+ 0 - 3
muted-tests.yml

@@ -336,9 +336,6 @@ tests:
 - class: org.elasticsearch.xpack.test.rest.XPackRestIT
 - class: org.elasticsearch.xpack.test.rest.XPackRestIT
   method: test {p0=transform/transforms_reset/Test force reseting a running transform}
   method: test {p0=transform/transforms_reset/Test force reseting a running transform}
   issue: https://github.com/elastic/elasticsearch/issues/126240
   issue: https://github.com/elastic/elasticsearch/issues/126240
-- class: org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsIntegTests
-  method: testCreateAndRestoreSearchableSnapshot
-  issue: https://github.com/elastic/elasticsearch/issues/119709
 - class: org.elasticsearch.xpack.test.rest.XPackRestIT
 - class: org.elasticsearch.xpack.test.rest.XPackRestIT
   method: test {p0=transform/transforms_stats/Test get transform stats}
   method: test {p0=transform/transforms_stats/Test get transform stats}
   issue: https://github.com/elastic/elasticsearch/issues/126270
   issue: https://github.com/elastic/elasticsearch/issues/126270

+ 5 - 1
test/framework/src/main/java/org/elasticsearch/index/engine/EngineTestCase.java

@@ -1397,7 +1397,11 @@ public abstract class EngineTestCase extends ESTestCase {
                 }
                 }
             }
             }
             assertThat(luceneOp, notNullValue());
             assertThat(luceneOp, notNullValue());
-            assertThat(luceneOp.toString(), luceneOp.primaryTerm(), equalTo(translogOp.primaryTerm()));
+            assertThat(
+                "primary term does not match, luceneOp=[" + luceneOp + "], translogOp=[" + translogOp + "]",
+                luceneOp.primaryTerm(),
+                equalTo(translogOp.primaryTerm())
+            );
             assertThat(luceneOp.opType(), equalTo(translogOp.opType()));
             assertThat(luceneOp.opType(), equalTo(translogOp.opType()));
             if (luceneOp.opType() == Translog.Operation.Type.INDEX) {
             if (luceneOp.opType() == Translog.Operation.Type.INDEX) {
                 if (engine.engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()
                 if (engine.engineConfig.getIndexSettings().isRecoverySourceSyntheticEnabled()