risdenk commented on code in PR #953:
URL: https://github.com/apache/solr/pull/953#discussion_r998772021


##########
solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java:
##########
@@ -425,22 +424,22 @@ public void testBasicSelect() throws Exception {
 
     tuples = getTuples(sParams, baseUrl);
 
-    assert (tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     tuple = tuples.get(0);
-    assert (tuple.getLong("myId") == 3);
-    assert (tuple.getLong("myInt") == 20);
-    assert (tuple.get("myString").equals("a"));
+    assertEquals(3, (long) tuple.getLong("myId"));

Review Comment:
   I think so - I'll take a look



##########
solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java:
##########
@@ -1915,17 +1914,17 @@ public void testTimeSeriesGrouping() throws Exception {
 
     List<Tuple> tuples = getTuples(sParams, baseUrl);
 
-    assert (tuples.size() == 2);
+    assertEquals(2, tuples.size());
 
     Tuple tuple;
 
     tuple = tuples.get(0);
-    assert (tuple.getLong("year_i") == 2015);
-    assert (tuple.getDouble("EXPR$1") == 66); // sum(item_i)
+    assertEquals(2015, (long) tuple.getLong("year_i"));
+    assertEquals(66, tuple.getDouble("EXPR$1"), 0.0); // sum(item_i)
 
     tuple = tuples.get(1);
-    assert (tuple.getLong("year_i") == 2014);
-    assert (tuple.getDouble("EXPR$1") == 7); // sum(item_i)
+    assertEquals(2014, (long) tuple.getLong("year_i"));

Review Comment:
   I think so - I'll take a look



##########
solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java:
##########
@@ -2177,43 +2176,43 @@ public void testTimeSeriesGroupingFacet() throws 
Exception {
 
     tuples = getTuples(sParams, baseUrl);
 
-    assert (tuples.size() == 6);
+    assertEquals(6, tuples.size());
 
     tuple = tuples.get(0);
-    assert (tuple.getLong("year_i") == 2015);
-    assert (tuple.getLong("month_i") == 11);
-    assert (tuple.getLong("day_i") == 8);
-    assert (tuple.getDouble("EXPR$3") == 42); // sum(item_i)
+    assertEquals(2015, (long) tuple.getLong("year_i"));

Review Comment:
   I think so - I'll take a look



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to