Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 11ABC200CDE for ; Tue, 8 Aug 2017 14:14:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 104171672D1; Tue, 8 Aug 2017 12:14:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 627701672C4 for ; Tue, 8 Aug 2017 14:14:29 +0200 (CEST) Received: (qmail 29051 invoked by uid 500); 8 Aug 2017 12:14:20 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 27200 invoked by uid 99); 8 Aug 2017 12:14:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2017 12:14:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 24A29F69B9; Tue, 8 Aug 2017 12:14:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shalin@apache.org To: commits@lucene.apache.org Date: Tue, 08 Aug 2017 12:14:40 -0000 Message-Id: <16ae560ef10741779b272250a6c779b5@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [27/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued '-Infinity' to BigDecimal archived-at: Tue, 08 Aug 2017 12:14:30 -0000 SOLR-10796: TestPointFields.testDoublePointFieldRangeFacet(): Guard against converting a double-valued '-Infinity' to BigDecimal Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cff5e985 Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cff5e985 Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cff5e985 Branch: refs/heads/feature/autoscaling Commit: cff5e985835759b4fcb64629ddca817fa6e17944 Parents: 3f9e748 Author: Steve Rowe Authored: Sat Aug 5 10:59:11 2017 -0400 Committer: Steve Rowe Committed: Sat Aug 5 10:59:11 2017 -0400 ---------------------------------------------------------------------- solr/core/src/test/org/apache/solr/schema/TestPointFields.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cff5e985/solr/core/src/test/org/apache/solr/schema/TestPointFields.java ---------------------------------------------------------------------- diff --git a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java index 8192406..5a89e78 100644 --- a/solr/core/src/test/org/apache/solr/schema/TestPointFields.java +++ b/solr/core/src/test/org/apache/solr/schema/TestPointFields.java @@ -615,7 +615,7 @@ public class TestPointFields extends SolrTestCaseJ4 { max = sortedValues.get(sortedValues.size() - 1); buffer = BigDecimal.valueOf(max).subtract(BigDecimal.valueOf(min)) .divide(BigDecimal.valueOf(numValues / 2), RoundingMode.HALF_UP).doubleValue(); - gap = BigDecimal.valueOf(max + buffer).subtract(BigDecimal.valueOf(min - buffer)) + gap = BigDecimal.valueOf(max).subtract(BigDecimal.valueOf(min)).add(BigDecimal.valueOf(buffer * 2.0D)) .divide(BigDecimal.valueOf(numBuckets), RoundingMode.HALF_UP).doubleValue(); } while (max >= Double.MAX_VALUE - buffer || min <= -Double.MAX_VALUE + buffer); // System.err.println("min: " + min + " max: " + max + " gap: " + gap + " buffer: " + buffer);