From commits-return-106104-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Jan 17 10:11:31 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 81671180663 for ; Thu, 17 Jan 2019 10:11:30 +0100 (CET) Received: (qmail 84274 invoked by uid 500); 17 Jan 2019 09:11:29 -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 84062 invoked by uid 99); 17 Jan 2019 09:11:29 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2019 09:11:29 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E0E4087187; Thu, 17 Jan 2019 09:11:28 +0000 (UTC) Date: Thu, 17 Jan 2019 09:11:29 +0000 To: "commits@lucene.apache.org" Subject: [lucene-solr] branch branch_8x updated: LUCENE-8643: TestLatLonLineShapeQueries.testRandomBig fails with suite timeout (simple text codec used, decreased iteration counts). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <154771628825.32296.17736457006332541847@gitbox.apache.org> From: dweiss@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: lucene-solr X-Git-Refname: refs/heads/branch_8x X-Git-Reftype: branch X-Git-Oldrev: 59ba68697060b48d147b9e118ed946545932d491 X-Git-Newrev: 727d395e58840e7d296acccc035e0a591d952c2c X-Git-Rev: 727d395e58840e7d296acccc035e0a591d952c2c X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. dweiss pushed a commit to branch branch_8x in repository https://gitbox.apache.org/repos/asf/lucene-solr.git The following commit(s) were added to refs/heads/branch_8x by this push: new 727d395 LUCENE-8643: TestLatLonLineShapeQueries.testRandomBig fails with suite timeout (simple text codec used, decreased iteration counts). 727d395 is described below commit 727d395e58840e7d296acccc035e0a591d952c2c Author: Dawid Weiss AuthorDate: Thu Jan 17 10:09:44 2019 +0100 LUCENE-8643: TestLatLonLineShapeQueries.testRandomBig fails with suite timeout (simple text codec used, decreased iteration counts). --- .../lucene/document/BaseLatLonShapeTestCase.java | 30 ++++++++++++++++------ .../document/TestLatLonLineShapeQueries.java | 1 + 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.java b/lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.java index da8d567..f26c79a 100644 --- a/lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.java +++ b/lucene/sandbox/src/test/org/apache/lucene/document/BaseLatLonShapeTestCase.java @@ -50,7 +50,7 @@ import org.apache.lucene.util.IOUtils; import org.apache.lucene.util.LuceneTestCase; import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean; -import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt; +import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween; import static org.apache.lucene.geo.GeoEncodingUtils.decodeLatitude; import static org.apache.lucene.geo.GeoEncodingUtils.decodeLongitude; import static org.apache.lucene.geo.GeoEncodingUtils.encodeLatitude; @@ -157,7 +157,7 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { // A particularly tricky adversary for BKD tree: public void testSameShapeManyTimes() throws Exception { - int numShapes = atLeast(1000); + int numShapes = atLeast(500); // Every doc has 2 points: Object theShape = nextShape(); @@ -173,13 +173,15 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { doTestRandom(10); } + @Slow public void testRandomMedium() throws Exception { - doTestRandom(10000); + doTestRandom(1000); } + @Slow @Nightly public void testRandomBig() throws Exception { - doTestRandom(50000); + doTestRandom(20000); } protected void doTestRandom(int count) throws Exception { @@ -192,7 +194,7 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { Object[] shapes = new Object[numShapes]; for (int id = 0; id < numShapes; ++id) { - int x = randomInt(20); + int x = randomIntBetween(0, 20); if (x == 17) { shapes[id] = null; if (VERBOSE) { @@ -266,7 +268,7 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { protected void verifyRandomBBoxQueries(IndexReader reader, Object... shapes) throws Exception { IndexSearcher s = newSearcher(reader); - final int iters = atLeast(75); + final int iters = scaledIterationCount(shapes.length); Bits liveDocs = MultiBits.getLiveDocs(s.getIndexReader()); int maxDoc = s.getIndexReader().maxDoc(); @@ -361,11 +363,23 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { } } + private int scaledIterationCount(int shapes) { + if (shapes < 500) { + return atLeast(50); + } else if (shapes < 5000) { + return atLeast(25); + } else if (shapes < 25000) { + return atLeast(5); + } else { + return atLeast(2); + } + } + /** test random generated lines */ protected void verifyRandomLineQueries(IndexReader reader, Object... shapes) throws Exception { IndexSearcher s = newSearcher(reader); - final int iters = atLeast(75); + final int iters = scaledIterationCount(shapes.length); Bits liveDocs = MultiBits.getLiveDocs(s.getIndexReader()); int maxDoc = s.getIndexReader().maxDoc(); @@ -452,7 +466,7 @@ public abstract class BaseLatLonShapeTestCase extends LuceneTestCase { protected void verifyRandomPolygonQueries(IndexReader reader, Object... shapes) throws Exception { IndexSearcher s = newSearcher(reader); - final int iters = atLeast(75); + final int iters = scaledIterationCount(shapes.length); Bits liveDocs = MultiBits.getLiveDocs(s.getIndexReader()); int maxDoc = s.getIndexReader().maxDoc(); diff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.java b/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.java index ab409f2..87a2c94 100644 --- a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.java +++ b/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonLineShapeQueries.java @@ -29,6 +29,7 @@ import org.apache.lucene.geo.Rectangle2D; import org.apache.lucene.index.PointValues.Relation; /** random bounding box and polygon query tests for random generated {@link Line} types */ +@SuppressWarnings("SimpleText") public class TestLatLonLineShapeQueries extends BaseLatLonShapeTestCase { protected final LineValidator VALIDATOR = new LineValidator();