Ver código fonte

Fix Uninformative Assertion in JdbcShardFailureIT (#86152)

We have a hard to understand failure in this one when trying to make a change, lets
make it tell us the concrete numbers at least.
Armin Braun 3 anos atrás
pai
commit
660f8eb4de

+ 2 - 1
x-pack/plugin/sql/qa/server/single-node/src/test/java/org/elasticsearch/xpack/sql/qa/single_node/JdbcShardFailureIT.java

@@ -19,6 +19,7 @@ import java.util.Locale;
 import java.util.Properties;
 
 import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 
 public class JdbcShardFailureIT extends JdbcIntegrationTestCase {
     private void createTestIndex() throws IOException {
@@ -136,7 +137,7 @@ public class JdbcShardFailureIT extends JdbcIntegrationTestCase {
             while (rs.next()) {
                 rows++;
             }
-            assertTrue(rows >= okShards);
+            assertThat(rows, greaterThanOrEqualTo(okShards));
         }
     }
 }