dweiss commented on code in PR #12982: URL: https://github.com/apache/lucene/pull/12982#discussion_r1445940966
########## lucene/core/src/test/org/apache/lucene/geo/TestTessellator.java: ########## @@ -841,20 +839,19 @@ public void testComplexPolygon50() throws Exception { public void testComplexPolygon50_WithMonitor() throws Exception { String geoJson = GeoTestUtil.readShape("lucene-10563-1.geojson.gz"); Polygon[] polygons = Polygon.fromGeoJSON(geoJson); - assertThat("Only one polygon", polygons.length, equalTo(1)); + assertEquals("Only one polygon", 1, polygons.length); Polygon polygon = polygons[0]; TestCountingMonitor monitor = new TestCountingMonitor(); Tessellator.tessellate(polygon, true, monitor); - assertThat("Expected many monitor calls", monitor.count, greaterThan(390)); - assertThat("Expected specific number of splits", monitor.splitsStarted, equalTo(3)); - assertThat( - "Expected splits to start and end", monitor.splitsStarted, equalTo(monitor.splitsEnded)); + assertTrue("Expected many monitor calls", monitor.count > 390); Review Comment: The downside of converting to an explicit comparison is that you won't know what the variable (monitor.count, etc.) was. Maybe these should be converted to hamcrest MatcherAssert.assertThat(...), just as JUnit deprecation message suggests? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org