List of usage examples for org.apache.solr JSONTestUtil DEFAULT_DELTA
double DEFAULT_DELTA
To view the source code for org.apache.solr JSONTestUtil DEFAULT_DELTA.
Click Source Link
From source file:org.vootoo.search.function.RandomValueSourceParserTest.java
License:Apache License
private boolean assertNotSameSum(Object inputObj) { int sameSum = 0; for (int i = 0; i < 4; i++) { String err = JSONTestUtil.matchObj("response/docs/[" + i + "]/id", inputObj, i + 1, JSONTestUtil.DEFAULT_DELTA); if (err != null) { //System.out.println(err); } else {/*from w w w .j ava 2 s.c o m*/ sameSum += 1; } } if (sameSum == 4) { logger.warn("sort rand maybe fail, sameSum=" + sameSum); } else { logger.info("sort randed=" + (sameSum < 4) + " sameSum=" + sameSum); } //Assert.assertTrue("not rand, sameSum="+sameSum+", total=4", sameSum < 4); return sameSum < 4; }