lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject lucene-solr:branch_6x: SOLR-9718: replace assert and assertTrue() to assertEquals()
Date Mon, 14 Nov 2016 07:05:53 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 6d9520768 -> a32b04959


SOLR-9718: replace assert and assertTrue() to assertEquals()


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a32b0495
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a32b0495
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a32b0495

Branch: refs/heads/branch_6x
Commit: a32b0495981997920c7988d4b1b93f5b85d3e553
Parents: 6d95207
Author: Noble Paul <noble@apache.org>
Authored: Mon Nov 14 12:33:37 2016 +0530
Committer: Noble Paul <noble@apache.org>
Committed: Mon Nov 14 12:35:36 2016 +0530

----------------------------------------------------------------------
 .../client/solrj/io/stream/StreamingTest.java   | 609 ++++++++++---------
 1 file changed, 305 insertions(+), 304 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a32b0495/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
index 0da6750..3888a41 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java
@@ -183,13 +183,13 @@ public class StreamingTest extends SolrCloudTestCase {
     ParallelStream pstream = parallelStream(ustream, new FieldComparator("a_f", ComparatorOrder.ASCENDING));
     attachStreamFactory(pstream);
     List<Tuple> tuples = getTuples(pstream);
-    assert(tuples.size() == 5);
+    assertEquals(5, tuples.size());
     assertOrder(tuples, 0, 1, 3, 4, 6);
 
     //Test the eofTuples
 
     Map<String,Tuple> eofTuples = pstream.getEofTuples();
-    assert(eofTuples.size() == numWorkers); //There should be an EOF tuple for each worker.
+    assertEquals(numWorkers, eofTuples.size()); //There should be an EOF tuple for each worker.
 
   }
 
@@ -214,8 +214,8 @@ public class StreamingTest extends SolrCloudTestCase {
         "sort", "a_i asc", "fq", "a_ss:hello0", "fq", "a_ss:hello1"));
     CloudSolrStream stream = new CloudSolrStream(zkHost, COLLECTION, params);
     List<Tuple> tuples = getTuples(stream);
-    assertEquals("Multiple fq clauses should have been honored", tuples.size(), 1);
-    assertEquals("should only have gotten back document 0", tuples.get(0).getString("id"),
"0");
+    assertEquals("Multiple fq clauses should have been honored", 1, tuples.size());
+    assertEquals("should only have gotten back document 0", "0", tuples.get(0).getString("id"));
   }
 
   @Test
@@ -235,7 +235,7 @@ public class StreamingTest extends SolrCloudTestCase {
     RankStream rstream = new RankStream(stream, 3, new FieldComparator("a_i",ComparatorOrder.DESCENDING));
     List<Tuple> tuples = getTuples(rstream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
     assertOrder(tuples, 4,3,2);
 
   }
@@ -263,7 +263,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     List<Tuple> tuples = getTuples(pstream);
 
-    assert(tuples.size() == 10);
+    assertEquals(10, tuples.size());
     assertOrder(tuples, 10,9,8,7,6,5,4,3,2,0);
 
   }
@@ -289,10 +289,10 @@ public class StreamingTest extends SolrCloudTestCase {
     CloudSolrStream stream = new CloudSolrStream(zkHost, COLLECTION, sParamsA);
     stream.setTrace(true);
     List<Tuple> tuples = getTuples(stream);
-    assert(tuples.get(0).get("_COLLECTION_").equals(COLLECTION));
-    assert(tuples.get(1).get("_COLLECTION_").equals(COLLECTION));
-    assert(tuples.get(2).get("_COLLECTION_").equals(COLLECTION));
-    assert(tuples.get(3).get("_COLLECTION_").equals(COLLECTION));
+    assertEquals(COLLECTION, tuples.get(0).get("_COLLECTION_"));
+    assertEquals(COLLECTION, tuples.get(1).get("_COLLECTION_"));
+    assertEquals(COLLECTION, tuples.get(2).get("_COLLECTION_"));
+    assertEquals(COLLECTION, tuples.get(3).get("_COLLECTION_"));
   }
 
   @Test
@@ -320,7 +320,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     List<Tuple> tuples = getTuples(rstream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     Tuple t0 = tuples.get(0);
     List<Map> maps0 = t0.getMaps("group");
@@ -343,7 +343,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     tuples = getTuples(rstream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     t0 = tuples.get(0);
     maps0 = t0.getMaps("group");
@@ -385,7 +385,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     List<Tuple> tuples = getTuples(rstream);
 
-    assert(tuples.size() == 0);
+    assertEquals(0, tuples.size());
 
   }
 
@@ -415,7 +415,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     List<Tuple> tuples = getTuples(pstream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     Tuple t0 = tuples.get(0);
     List<Map> maps0 = t0.getMaps("group");
@@ -441,7 +441,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     tuples = getTuples(pstream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     t0 = tuples.get(0);
     maps0 = t0.getMaps("group");
@@ -479,19 +479,19 @@ public class StreamingTest extends SolrCloudTestCase {
     CloudSolrStream stream = new CloudSolrStream(zkHost, COLLECTION, sParamsA);
     ExceptionStream estream = new ExceptionStream(stream);
     Tuple t = getTuple(estream);
-    assert(t.EOF);
-    assert(t.EXCEPTION);
-    assert(t.getException().contains("sort param field can't be found: blah"));
+    assertTrue(t.EOF);
+    assertTrue(t.EXCEPTION);
+    assertTrue(t.getException().contains("sort param field can't be found: blah"));
 
     //Test an error that comes originates from the /export handler
     sParamsA = mapParams("q", "*:*", "fl", "a_s,a_i,a_f,score", "sort", "a_s asc", "qt",
"/export");
     stream = new CloudSolrStream(zkHost, COLLECTION, sParamsA);
     estream = new ExceptionStream(stream);
     t = getTuple(estream);
-    assert(t.EOF);
-    assert(t.EXCEPTION);
+    assertTrue(t.EOF);
+    assertTrue(t.EXCEPTION);
     //The /export handler will pass through a real exception.
-    assert(t.getException().contains("undefined field:"));
+    assertTrue(t.getException().contains("undefined field:"));
   }
 
   @Test
@@ -516,10 +516,10 @@ public class StreamingTest extends SolrCloudTestCase {
     ParallelStream pstream = new ParallelStream(zkHost, COLLECTION, stream, 2, new FieldComparator("blah",
ComparatorOrder.ASCENDING));
     ExceptionStream estream = new ExceptionStream(pstream);
     Tuple t = getTuple(estream);
-    assert(t.EOF);
-    assert(t.EXCEPTION);
+    assertTrue(t.EOF);
+    assertTrue(t.EXCEPTION);
     //ParallelStream requires that partitionKeys be set.
-    assert(t.getException().contains("When numWorkers > 1 partitionKeys must be set."));
+    assertTrue(t.getException().contains("When numWorkers > 1 partitionKeys must be set."));
 
 
     //Test an error that originates from the /select handler
@@ -528,9 +528,9 @@ public class StreamingTest extends SolrCloudTestCase {
     pstream = new ParallelStream(zkHost, COLLECTION, stream, 2, new FieldComparator("blah",
ComparatorOrder.ASCENDING));
     estream = new ExceptionStream(pstream);
     t = getTuple(estream);
-    assert(t.EOF);
-    assert(t.EXCEPTION);
-    assert(t.getException().contains("sort param field can't be found: blah"));
+    assertTrue(t.EOF);
+    assertTrue(t.EXCEPTION);
+    assertTrue(t.getException().contains("sort param field can't be found: blah"));
 
 
     //Test an error that originates from the /export handler
@@ -539,10 +539,10 @@ public class StreamingTest extends SolrCloudTestCase {
     pstream = new ParallelStream(zkHost, COLLECTION, stream, 2, new FieldComparator("a_s",
ComparatorOrder.ASCENDING));
     estream = new ExceptionStream(pstream);
     t = getTuple(estream);
-    assert(t.EOF);
-    assert(t.EXCEPTION);
+    assertTrue(t.EOF);
+    assertTrue(t.EXCEPTION);
     //The /export handler will pass through a real exception.
-    assert(t.getException().contains("undefined field:"));
+    assertTrue(t.getException().contains("undefined field:"));
   }
 
   @Test
@@ -577,7 +577,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     List<Tuple> tuples = getTuples(statsStream);
 
-    assert(tuples.size() == 1);
+    assertEquals(1, tuples.size());
 
     //Test Long and Double Sums
 
@@ -593,15 +593,15 @@ public class StreamingTest extends SolrCloudTestCase {
     Double avgf = tuple.getDouble("avg(a_f)");
     Double count = tuple.getDouble("count(*)");
 
-    assertTrue(sumi.longValue() == 70);
-    assertTrue(sumf.doubleValue() == 55.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 7.0D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 10);
+    assertEquals(70, sumi.longValue());
+    assertEquals(55.0, sumf.doubleValue(), 0.01);
+    assertEquals(0.0, mini.doubleValue(), 0.01);
+    assertEquals(1.0, minf.doubleValue(), 0.01);
+    assertEquals(14.0, maxi.doubleValue(), 0.01);
+    assertEquals(10.0, maxf.doubleValue(), 0.01);
+    assertEquals(7.0, avgi.doubleValue(), .01);
+    assertEquals(5.5, avgf.doubleValue(), .001);
+    assertEquals(10, count.doubleValue(), .01);
 
   }
 
@@ -658,16 +658,16 @@ public class StreamingTest extends SolrCloudTestCase {
     Double avgf = tuple.getDouble("avg(a_f)");
     Double count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11.0, sumf.doubleValue(), 0.01);
+    assertEquals(4.0, mini.doubleValue(), 0.01);
+    assertEquals(4.0, minf.doubleValue(), 0.01);
+    assertEquals(11.0, maxi.doubleValue(), 0.01);
+    assertEquals(7.0, maxf.doubleValue(), 0.01);
+    assertEquals(7.5, avgi.doubleValue(), 0.01);
+    assertEquals(5.5, avgf.doubleValue(), 0.01);
+    assertEquals(2, count.doubleValue(), 0.01);
 
     tuple = tuples.get(1);
     bucket = tuple.getString("a_s");
@@ -681,16 +681,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), .01);
+    assertEquals(18, sumf.doubleValue(), .01);
+    assertEquals(0.0, mini.doubleValue(), .01);
+    assertEquals(1.0, minf.doubleValue(), .01);
+    assertEquals(14.0, maxi.doubleValue(), .01);
+    assertEquals(10.0, maxf.doubleValue(), .01);
+    assertEquals(4.25, avgi.doubleValue(), .01);
+    assertEquals(4.5, avgf.doubleValue(), .01);
+    assertEquals(4, count.doubleValue(), .01);
 
     tuple = tuples.get(2);
     bucket = tuple.getString("a_s");
@@ -704,16 +704,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello3"));
-    assertTrue(sumi.doubleValue() == 38.0D);
-    assertTrue(sumf.doubleValue() == 26.0D);
-    assertTrue(mini.doubleValue() == 3.0D);
-    assertTrue(minf.doubleValue() == 3.0D);
-    assertTrue(maxi.doubleValue() == 13.0D);
-    assertTrue(maxf.doubleValue() == 9.0D);
-    assertTrue(avgi.doubleValue() == 9.5D);
-    assertTrue(avgf.doubleValue() == 6.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello3", bucket);
+    assertEquals(38.0, sumi.doubleValue(), 0.01);
+    assertEquals(26.0, sumf.doubleValue(), 0.01);
+    assertEquals(3.0, mini.doubleValue(), 0.01);
+    assertEquals(3.0, minf.doubleValue(), 0.01);
+    assertEquals(13.0, maxi.doubleValue(), 0.01);
+    assertEquals(9.0, maxf.doubleValue(), 0.01);
+    assertEquals(9.5, avgi.doubleValue(), 0.01);
+    assertEquals(6.5, avgf.doubleValue(), 0.01);
+    assertEquals(4, count.doubleValue(), 0.01);
 
 
     //Reverse the Sort.
@@ -724,7 +724,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     tuples = getTuples(facetStream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     //Test Long and Double Sums
 
@@ -740,16 +740,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello3"));
-    assertTrue(sumi.doubleValue() == 38.0D);
-    assertTrue(sumf.doubleValue() == 26.0D);
-    assertTrue(mini.doubleValue() == 3.0D);
-    assertTrue(minf.doubleValue() == 3.0D);
-    assertTrue(maxi.doubleValue() == 13.0D);
-    assertTrue(maxf.doubleValue() == 9.0D);
-    assertTrue(avgi.doubleValue() == 9.5D);
-    assertTrue(avgf.doubleValue() == 6.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello3", bucket);
+    assertEquals(38, sumi.doubleValue(), 0.1);
+    assertEquals(26, sumf.doubleValue(), 0.1);
+    assertEquals(3, mini.doubleValue(), 0.1);
+    assertEquals(3, minf.doubleValue(), 0.1);
+    assertEquals(13, maxi.doubleValue(), 0.1);
+    assertEquals(9, maxf.doubleValue(), 0.1);
+    assertEquals(9.5, avgi.doubleValue(), 0.1);
+    assertEquals(6.5, avgf.doubleValue(), 0.1);
+    assertEquals(4, count.doubleValue(), 0.1);
 
     tuple = tuples.get(1);
     bucket = tuple.getString("a_s");
@@ -763,16 +763,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), 0.01);
+    assertEquals(18, sumf.doubleValue(), 0.01);
+    assertEquals(0, mini.doubleValue(), 0.01);
+    assertEquals(1, minf.doubleValue(), 0.01);
+    assertEquals(14, maxi.doubleValue(), 0.01);
+    assertEquals(10, maxf.doubleValue(), 0.01);
+    assertEquals(4.25, avgi.doubleValue(), 0.01);
+    assertEquals(4.5, avgf.doubleValue(), 0.01);
+    assertEquals(4, count.doubleValue(), 0.01);
 
     tuple = tuples.get(2);
     bucket = tuple.getString("a_s");
@@ -786,16 +786,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11, sumf.doubleValue(), 0.01);
+    assertEquals(4.0, mini.doubleValue(), 0.01);
+    assertEquals(4.0, minf.doubleValue(), 0.01);
+    assertEquals(11.0, maxi.doubleValue(), 0.01);
+    assertEquals(7.0, maxf.doubleValue(), 0.01);
+    assertEquals(7.5, avgi.doubleValue(), 0.01);
+    assertEquals(5.5, avgf.doubleValue(), 0.01);
+    assertEquals(2, count.doubleValue(), 0.01);
 
 
     //Test index sort
@@ -807,7 +807,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     tuples = getTuples(facetStream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
 
     tuple = tuples.get(0);
@@ -823,16 +823,16 @@ public class StreamingTest extends SolrCloudTestCase {
     count = tuple.getDouble("count(*)");
 
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11, sumf.doubleValue(), 0.01);
+    assertEquals(4, mini.doubleValue(), 0.01);
+    assertEquals(4, minf.doubleValue(), 0.01);
+    assertEquals(11, maxi.doubleValue(), 0.01);
+    assertEquals(7, maxf.doubleValue(), 0.01);
+    assertEquals(7.5, avgi.doubleValue(), 0.01);
+    assertEquals(5.5, avgf.doubleValue(), 0.01);
+    assertEquals(2, count.doubleValue(), 0.01);
 
     tuple = tuples.get(1);
     bucket = tuple.getString("a_s");
@@ -869,16 +869,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), 0.01);
+    assertEquals(18, sumf.doubleValue(), 0.01);
+    assertEquals(0, mini.doubleValue(), 0.01);
+    assertEquals(1, minf.doubleValue(), 0.01);
+    assertEquals(14, maxi.doubleValue(), 0.01);
+    assertEquals(10, maxf.doubleValue(), 0.01);
+    assertEquals(4.25, avgi.doubleValue(), 0.01);
+    assertEquals(4.5, avgf.doubleValue(), 0.01);
+    assertEquals(4, count.doubleValue(), 0.01);
 
     //Test index sort
 
@@ -888,7 +888,7 @@ public class StreamingTest extends SolrCloudTestCase {
 
     tuples = getTuples(facetStream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     tuple = tuples.get(0);
     bucket = tuple.getString("a_s");
@@ -902,16 +902,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), 0.01);
+    assertEquals(18, sumf.doubleValue(), 0.01);
+    assertEquals(0, mini.doubleValue(), 0.01);
+    assertEquals(1, minf.doubleValue(), 0.01);
+    assertEquals(14, maxi.doubleValue(), 0.01);
+    assertEquals(10, maxf.doubleValue(), 0.01);
+    assertEquals(4.25, avgi.doubleValue(), 0.0001);
+    assertEquals(4.5, avgf.doubleValue(), 0.001);
+    assertEquals(4, count.doubleValue(), 0.01);
 
     tuple = tuples.get(1);
     bucket = tuple.getString("a_s");
@@ -925,16 +925,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello3"));
-    assertTrue(sumi.doubleValue() == 38.0D);
-    assertTrue(sumf.doubleValue() == 26.0D);
-    assertTrue(mini.doubleValue() == 3.0D);
-    assertTrue(minf.doubleValue() == 3.0D);
-    assertTrue(maxi.doubleValue() == 13.0D);
-    assertTrue(maxf.doubleValue() == 9.0D);
-    assertTrue(avgi.doubleValue() == 9.5D);
-    assertTrue(avgf.doubleValue() == 6.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello3", bucket);
+    assertEquals(38, sumi.doubleValue(), 0.01);
+    assertEquals(26, sumf.doubleValue(), 0.01);
+    assertEquals(3, mini.doubleValue(), 0.01);
+    assertEquals(3, minf.doubleValue(), 0.01);
+    assertEquals(13, maxi.doubleValue(), 0.01);
+    assertEquals(9, maxf.doubleValue(), 0.01);
+    assertEquals(9.5, avgi.doubleValue(), 0.01);
+    assertEquals(6.5, avgf.doubleValue(), 0.01);
+    assertEquals(4, count.doubleValue(), 0.01);
 
     tuple = tuples.get(2);
     bucket = tuple.getString("a_s");
@@ -948,16 +948,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11.0, sumf.doubleValue(), 0.1);
+    assertEquals(4.0, mini.doubleValue(), 0.1);
+    assertEquals(4.0, minf.doubleValue(), 0.1);
+    assertEquals(11.0, maxi.doubleValue(), 0.1);
+    assertEquals(7.0, maxf.doubleValue(), 0.1);
+    assertEquals(7.5, avgi.doubleValue(), 0.1);
+    assertEquals(5.5, avgf.doubleValue(), 0.1);
+    assertEquals(2, count.doubleValue(), 0.1);
 
   }
 
@@ -996,7 +996,7 @@ public class StreamingTest extends SolrCloudTestCase {
         100);
 
     List<Tuple> tuples = getTuples(facetStream);
-    assert(tuples.size() == 6);
+    assertEquals(6, tuples.size());
 
     Tuple tuple = tuples.get(0);
     String bucket1 = tuple.getString("level1_s");
@@ -1004,10 +1004,10 @@ public class StreamingTest extends SolrCloudTestCase {
     Double sumi = tuple.getDouble("sum(a_i)");
     Double count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello3"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 35);
-    assertTrue(count.doubleValue() == 3);
+    assertEquals("hello3", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(35, sumi.longValue());
+    assertEquals(3, count, 0.1);
 
     tuple = tuples.get(1);
     bucket1 = tuple.getString("level1_s");
@@ -1015,10 +1015,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello0"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello0", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(15, sumi.longValue());
+    assertEquals(2, count, 0.1);
 
     tuple = tuples.get(2);
     bucket1 = tuple.getString("level1_s");
@@ -1026,10 +1026,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello4"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 11);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello4", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(11, sumi.longValue());
+    assertEquals(1, count.doubleValue(), 0.1);
 
     tuple = tuples.get(3);
     bucket1 = tuple.getString("level1_s");
@@ -1037,10 +1037,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello4"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 4);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello4", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(4, sumi.longValue());
+    assertEquals(1, count.doubleValue(), 0.1);
 
     tuple = tuples.get(4);
     bucket1 = tuple.getString("level1_s");
@@ -1048,10 +1048,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello3"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 3);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello3", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(3, sumi.longValue());
+    assertEquals(1, count.doubleValue(), 0.1);
 
     tuple = tuples.get(5);
     bucket1 = tuple.getString("level1_s");
@@ -1059,10 +1059,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello0"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 2);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello0", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(2, sumi.longValue());
+    assertEquals(2, count.doubleValue(), 0.1);
 
     sorts[0] =  new FieldComparator("level1_s", ComparatorOrder.DESCENDING );
     sorts[1] =  new FieldComparator("level2_s", ComparatorOrder.DESCENDING );
@@ -1076,7 +1076,7 @@ public class StreamingTest extends SolrCloudTestCase {
         100);
 
     tuples = getTuples(facetStream);
-    assert(tuples.size() == 6);
+    assertEquals(6, tuples.size());
 
     tuple = tuples.get(0);
     bucket1 = tuple.getString("level1_s");
@@ -1084,10 +1084,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello4"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 11);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello4", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(11, sumi.longValue());
+    assertEquals(1, count, 0.1);
 
     tuple = tuples.get(1);
     bucket1 = tuple.getString("level1_s");
@@ -1095,10 +1095,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello4"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 4);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello4", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(4, sumi.longValue());
+    assertEquals(1, count.doubleValue(), 0.1);
 
     tuple = tuples.get(2);
     bucket1 = tuple.getString("level1_s");
@@ -1106,10 +1106,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello3"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 35);
-    assertTrue(count.doubleValue() == 3);
+    assertEquals("hello3", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(35, sumi.longValue());
+    assertEquals(3, count.doubleValue(), 0.1);
 
     tuple = tuples.get(3);
     bucket1 = tuple.getString("level1_s");
@@ -1117,10 +1117,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello3"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 3);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals("hello3", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(3, sumi.longValue());
+    assertEquals(1, count.doubleValue(), 0.1);
 
     tuple = tuples.get(4);
     bucket1 = tuple.getString("level1_s");
@@ -1128,10 +1128,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello0"));
-    assertTrue(bucket2.equals("b"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello0", bucket1);
+    assertEquals("b", bucket2);
+    assertEquals(15, sumi.longValue());
+    assertEquals(2, count.doubleValue(), 0.1);
 
     tuple = tuples.get(5);
     bucket1 = tuple.getString("level1_s");
@@ -1139,10 +1139,10 @@ public class StreamingTest extends SolrCloudTestCase {
     sumi = tuple.getDouble("sum(a_i)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket1.equals("hello0"));
-    assertTrue(bucket2.equals("a"));
-    assertTrue(sumi.longValue() == 2);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello0", bucket1);
+    assertEquals("a", bucket2);
+    assertEquals(2, sumi.longValue());
+    assertEquals(2, count.doubleValue(), 0.1);
 
   }
 
@@ -1197,16 +1197,16 @@ public class StreamingTest extends SolrCloudTestCase {
     Double count = tuple.getDouble("count(*)");
 
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), 0.001);
+    assertEquals(18, sumf.doubleValue(), 0.001);
+    assertEquals(0, mini.doubleValue(), 0.001);
+    assertEquals(1, minf.doubleValue(), 0.001);
+    assertEquals(14, maxi.doubleValue(), 0.001);
+    assertEquals(10, maxf.doubleValue(), 0.001);
+    assertEquals(4.25, avgi.doubleValue(), 0.001);
+    assertEquals(4.5, avgf.doubleValue(), 0.001);
+    assertEquals(4, count.doubleValue(), 0.001);
 
 
     tuple = tuples.get(1);
@@ -1221,16 +1221,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello3"));
-    assertTrue(sumi.doubleValue() == 38.0D);
-    assertTrue(sumf.doubleValue() == 26.0D);
-    assertTrue(mini.doubleValue() == 3.0D);
-    assertTrue(minf.doubleValue() == 3.0D);
-    assertTrue(maxi.doubleValue() == 13.0D);
-    assertTrue(maxf.doubleValue() == 9.0D);
-    assertTrue(avgi.doubleValue() == 9.5D);
-    assertTrue(avgf.doubleValue() == 6.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello3", bucket);
+    assertEquals(38, sumi.doubleValue(), 0.001);
+    assertEquals(26, sumf.doubleValue(), 0.001);
+    assertEquals(3, mini.doubleValue(), 0.001);
+    assertEquals(3, minf.doubleValue(), 0.001);
+    assertEquals(13, maxi.doubleValue(), 0.001);
+    assertEquals(9, maxf.doubleValue(), 0.001);
+    assertEquals(9.5, avgi.doubleValue(), 0.001);
+    assertEquals(6.5, avgf.doubleValue(), 0.001);
+    assertEquals(4, count.doubleValue(), 0.001);
 
 
     tuple = tuples.get(2);
@@ -1245,16 +1245,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11, sumf.doubleValue(), 0.01);
+    assertEquals(4, mini.doubleValue(), 0.01);
+    assertEquals(4, minf.doubleValue(), 0.01);
+    assertEquals(11, maxi.doubleValue(), 0.01);
+    assertEquals(7, maxf.doubleValue(), 0.01);
+    assertEquals(7.5, avgi.doubleValue(), 0.01);
+    assertEquals(5.5, avgf.doubleValue(), 0.01);
+    assertEquals(2, count.doubleValue(), 0.01);
 
 
     //Test will null value in the grouping field
@@ -1280,9 +1280,9 @@ public class StreamingTest extends SolrCloudTestCase {
     rollupStream = new RollupStream(stream, buckets1, metrics1);
     tuples = getTuples(rollupStream);
     //Check that we've got the extra NULL bucket
-    assert(tuples.size() == 4);
+    assertEquals(4, tuples.size());
     tuple = tuples.get(0);
-    assert(tuple.getString("a_s").equals("NULL"));
+    assertEquals("NULL", tuple.getString("a_s"));
 
     sumi = tuple.getDouble("sum(a_i)");
     sumf = tuple.getDouble("sum(a_f)");
@@ -1294,15 +1294,15 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(sumi.doubleValue() == 14.0D);
-    assertTrue(sumf.doubleValue() == 10.0D);
-    assertTrue(mini.doubleValue() == 14.0D);
-    assertTrue(minf.doubleValue() == 10.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 14.0D);
-    assertTrue(avgf.doubleValue() == 10.0D);
-    assertTrue(count.doubleValue() == 1);
+    assertEquals(14, sumi.doubleValue(), 0.01);
+    assertEquals(10, sumf.doubleValue(), 0.01);
+    assertEquals(14, mini.doubleValue(), 0.01);
+    assertEquals(10, minf.doubleValue(), 0.01);
+    assertEquals(14, maxi.doubleValue(), 0.01);
+    assertEquals(10, maxf.doubleValue(), 0.01);
+    assertEquals(14, avgi.doubleValue(), 0.01);
+    assertEquals(10, avgf.doubleValue(), 0.01);
+    assertEquals(1, count.doubleValue(), 0.01);
 
   }
 
@@ -1412,7 +1412,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(parallelStream);
     List<Tuple> tuples = getTuples(parallelStream);
 
-    assert(tuples.size() == 3);
+    assertEquals(3, tuples.size());
 
     //Test Long and Double Sums
 
@@ -1428,16 +1428,16 @@ public class StreamingTest extends SolrCloudTestCase {
     Double avgf = tuple.getDouble("avg(a_f)");
     Double count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello0"));
-    assertTrue(sumi.doubleValue() == 17.0D);
-    assertTrue(sumf.doubleValue() == 18.0D);
-    assertTrue(mini.doubleValue() == 0.0D);
-    assertTrue(minf.doubleValue() == 1.0D);
-    assertTrue(maxi.doubleValue() == 14.0D);
-    assertTrue(maxf.doubleValue() == 10.0D);
-    assertTrue(avgi.doubleValue() == 4.25D);
-    assertTrue(avgf.doubleValue() == 4.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello0", bucket);
+    assertEquals(17, sumi.doubleValue(), 0.001);
+    assertEquals(18, sumf.doubleValue(), 0.001);
+    assertEquals(0, mini.doubleValue(), 0.001);
+    assertEquals(1, minf.doubleValue(), 0.001);
+    assertEquals(14, maxi.doubleValue(), 0.001);
+    assertEquals(10, maxf.doubleValue(), 0.001);
+    assertEquals(4.25, avgi.doubleValue(), 0.001);
+    assertEquals(4.5, avgf.doubleValue(), 0.001);
+    assertEquals(4, count.doubleValue(), 0.001);
 
     tuple = tuples.get(1);
     bucket = tuple.getString("a_s");
@@ -1451,16 +1451,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello3"));
-    assertTrue(sumi.doubleValue() == 38.0D);
-    assertTrue(sumf.doubleValue() == 26.0D);
-    assertTrue(mini.doubleValue() == 3.0D);
-    assertTrue(minf.doubleValue() == 3.0D);
-    assertTrue(maxi.doubleValue() == 13.0D);
-    assertTrue(maxf.doubleValue() == 9.0D);
-    assertTrue(avgi.doubleValue() == 9.5D);
-    assertTrue(avgf.doubleValue() == 6.5D);
-    assertTrue(count.doubleValue() == 4);
+    assertEquals("hello3", bucket);
+    assertEquals(38, sumi.doubleValue(), 0.001);
+    assertEquals(26, sumf.doubleValue(), 0.001);
+    assertEquals(3, mini.doubleValue(), 0.001);
+    assertEquals(3, minf.doubleValue(), 0.001);
+    assertEquals(13, maxi.doubleValue(), 0.001);
+    assertEquals(9, maxf.doubleValue(), 0.001);
+    assertEquals(9.5, avgi.doubleValue(), 0.001);
+    assertEquals(6.5, avgf.doubleValue(), 0.001);
+    assertEquals(4, count.doubleValue(), 0.001);
 
     tuple = tuples.get(2);
     bucket = tuple.getString("a_s");
@@ -1474,16 +1474,16 @@ public class StreamingTest extends SolrCloudTestCase {
     avgf = tuple.getDouble("avg(a_f)");
     count = tuple.getDouble("count(*)");
 
-    assertTrue(bucket.equals("hello4"));
-    assertTrue(sumi.longValue() == 15);
-    assertTrue(sumf.doubleValue() == 11.0D);
-    assertTrue(mini.doubleValue() == 4.0D);
-    assertTrue(minf.doubleValue() == 4.0D);
-    assertTrue(maxi.doubleValue() == 11.0D);
-    assertTrue(maxf.doubleValue() == 7.0D);
-    assertTrue(avgi.doubleValue() == 7.5D);
-    assertTrue(avgf.doubleValue() == 5.5D);
-    assertTrue(count.doubleValue() == 2);
+    assertEquals("hello4", bucket);
+    assertEquals(15, sumi.longValue());
+    assertEquals(11, sumf.doubleValue(), 0.001);
+    assertEquals(4, mini.doubleValue(), 0.001);
+    assertEquals(4, minf.doubleValue(), 0.001);
+    assertEquals(11, maxi.doubleValue(), 0.001);
+    assertEquals(7, maxf.doubleValue(), 0.001);
+    assertEquals(7.5, avgi.doubleValue(), 0.001);
+    assertEquals(5.5, avgf.doubleValue(), 0.001);
+    assertEquals(2, count.doubleValue(), 0.001);
 
   }
 
@@ -1529,26 +1529,27 @@ public class StreamingTest extends SolrCloudTestCase {
     Tuple tuple = tuples.get(0);
 
     String s = tuple.getString("a_s");
-    assert(s.equals("hello0")) ;
+    assertEquals("hello0", s);
+    ;
 
     long l = tuple.getLong("a_i");
-    assert(l == 0);
+    assertEquals(0, l);
 
     double d = tuple.getDouble("a_f");
-    assert(d == 5.1);
+    assertEquals(5.1, d, 0.001);
 
 
     List<String> stringList = tuple.getStrings("s_multi");
-    assert(stringList.get(0).equals("a"));
-    assert(stringList.get(1).equals("b"));
+    assertEquals("a", stringList.get(0));
+    assertEquals("b", stringList.get(1));
 
     List<Long> longList = tuple.getLongs("i_multi");
-    assert(longList.get(0).longValue() == 1);
-    assert(longList.get(1).longValue() == 2);
+    assertEquals(1, longList.get(0).longValue());
+    assertEquals(2, longList.get(1).longValue());
 
     List<Double> doubleList = tuple.getDoubles("f_multi");
-    assert(doubleList.get(0).doubleValue() == 1.2);
-    assert(doubleList.get(1).doubleValue() == 1.3);
+    assertEquals(1.2, doubleList.get(0).doubleValue(), 0.001);
+    assertEquals(1.3, doubleList.get(1).doubleValue(), 0.001);
 
   }
 
@@ -1573,7 +1574,7 @@ public class StreamingTest extends SolrCloudTestCase {
     MergeStream mstream = new MergeStream(streamA, streamB, new FieldComparator("a_i",ComparatorOrder.ASCENDING));
     List<Tuple> tuples = getTuples(mstream);
 
-    assert(tuples.size() == 5);
+    assertEquals(5, tuples.size());
     assertOrder(tuples, 0,1,2,3,4);
 
     //Test descending
@@ -1586,7 +1587,7 @@ public class StreamingTest extends SolrCloudTestCase {
     mstream = new MergeStream(streamA, streamB, new FieldComparator("a_i",ComparatorOrder.DESCENDING));
     tuples = getTuples(mstream);
 
-    assert(tuples.size() == 5);
+    assertEquals(5, tuples.size());
     assertOrder(tuples, 4,3,2,1,0);
 
     //Test compound sort
@@ -1600,7 +1601,7 @@ public class StreamingTest extends SolrCloudTestCase {
     mstream = new MergeStream(streamA, streamB, new MultipleFieldComparator(new FieldComparator("a_f",ComparatorOrder.ASCENDING),new
FieldComparator("a_i",ComparatorOrder.ASCENDING)));
     tuples = getTuples(mstream);
 
-    assert(tuples.size() == 5);
+    assertEquals(5, tuples.size());
     assertOrder(tuples, 0,2,1,3,4);
 
     sParamsA = mapParams("q", "id:(2 4 1)", "fl", "id,a_s,a_i,a_f", "sort", "a_f asc,a_i
desc");
@@ -1612,7 +1613,7 @@ public class StreamingTest extends SolrCloudTestCase {
     mstream = new MergeStream(streamA, streamB, new MultipleFieldComparator(new FieldComparator("a_f",ComparatorOrder.ASCENDING),new
FieldComparator("a_i",ComparatorOrder.DESCENDING)));
     tuples = getTuples(mstream);
 
-    assert(tuples.size() == 5);
+    assertEquals(5, tuples.size());
     assertOrder(tuples, 2,0,1,3,4);
 
   }
@@ -1645,7 +1646,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     List<Tuple> tuples = getTuples(pstream);
 
-    assert(tuples.size() == 9);
+    assertEquals(9, tuples.size());
     assertOrder(tuples, 0,1,2,3,4,7,6,8,9);
 
     //Test descending
@@ -1660,7 +1661,7 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     tuples = getTuples(pstream);
 
-    assert(tuples.size() == 8);
+    assertEquals(8, tuples.size());
     assertOrder(tuples, 9,8,6,4,3,2,1,0);
 
   }
@@ -1693,9 +1694,9 @@ public class StreamingTest extends SolrCloudTestCase {
     attachStreamFactory(pstream);
     List<Tuple> tuples = getTuples(pstream);
 
-    assert(tuples.size() == 9);
+    assertEquals(9, tuples.size());
     Map<String, Tuple> eofTuples = pstream.getEofTuples();
-    assert(eofTuples.size() == numWorkers); // There should be an EOF Tuple for each worker.
+    assertEquals(numWorkers, eofTuples.size()); // There should be an EOF Tuple for each
worker.
 
   }
 
@@ -1835,21 +1836,21 @@ public class StreamingTest extends SolrCloudTestCase {
 
       Tuple tuple = getTuple(stream); // All I really care about is that all the fields are
returned. There's
 
-      assertTrue("Integers should be returned", tuple.getLong("i_sing") == 11L);
-      assertTrue("MV should be returned for i_multi", tuple.getLongs("i_multi").get(0) ==
12);
-      assertTrue("MV should be returned for i_multi", tuple.getLongs("i_multi").get(1) ==
13);
+      assertEquals("Integers should be returned", 11, tuple.getLong("i_sing").longValue());
+      assertEquals("MV should be returned for i_multi", 12, tuple.getLongs("i_multi").get(0).longValue());
+      assertEquals("MV should be returned for i_multi", 13, tuple.getLongs("i_multi").get(1).longValue());
 
-      assertTrue("longs should be returned", tuple.getLong("l_sing") == 14L);
-      assertTrue("MV should be returned for l_multi", tuple.getLongs("l_multi").get(0) ==
15);
-      assertTrue("MV should be returned for l_multi", tuple.getLongs("l_multi").get(1) ==
16);
+      assertEquals("longs should be returned", 14,tuple.getLong("l_sing").longValue());
+      assertEquals("MV should be returned for l_multi",15, tuple.getLongs("l_multi").get(0).longValue());
+      assertEquals("MV should be returned for l_multi", 16, tuple.getLongs("l_multi").get(1).longValue());
 
-      assertTrue("floats should be returned", tuple.getDouble("f_sing") == 1.7);
-      assertTrue("MV should be returned for f_multi", tuple.getDoubles("f_multi").get(0)
== 1.8);
-      assertTrue("MV should be returned for f_multi", tuple.getDoubles("f_multi").get(1)
== 1.9);
+      assertEquals("floats should be returned", 1.7, tuple.getDouble("f_sing").doubleValue(),
0.001);
+      assertEquals("MV should be returned for f_multi", 1.8, tuple.getDoubles("f_multi").get(0).doubleValue(),
0.001);
+      assertEquals("MV should be returned for f_multi", 1.9, tuple.getDoubles("f_multi").get(1).doubleValue(),
0.001);
 
-      assertTrue("doubles should be returned", tuple.getDouble("d_sing") == 1.2);
-      assertTrue("MV should be returned for d_multi", tuple.getDoubles("d_multi").get(0)
== 1.21);
-      assertTrue("MV should be returned for d_multi", tuple.getDoubles("d_multi").get(1)
== 1.22);
+      assertEquals("doubles should be returned", 1.2, tuple.getDouble("d_sing").doubleValue(),
0.001);
+      assertEquals("MV should be returned for d_multi", 1.21, tuple.getDoubles("d_multi").get(0).doubleValue(),
0.001);
+      assertEquals("MV should be returned for d_multi", 1.22, tuple.getDoubles("d_multi").get(1).doubleValue(),
0.001);
 
       assertTrue("Strings should be returned", tuple.getString("s_sing").equals("single"));
       assertTrue("MV should be returned for s_multi", tuple.getStrings("s_multi").get(0).equals("sm1"));


Mime
View raw message