lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkn...@apache.org
Subject lucene-solr:master: LUCENE-8396: silence random large poly test - for now
Date Sat, 14 Jul 2018 17:48:47 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master b5ef13330 -> 3b1714e73


LUCENE-8396: silence random large poly test - for now


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

Branch: refs/heads/master
Commit: 3b1714e737049ec562c8dce66fc5fe8cdad74097
Parents: b5ef133
Author: Nicholas Knize <nknize@gmail.com>
Authored: Sat Jul 14 12:48:28 2018 -0500
Committer: Nicholas Knize <nknize@gmail.com>
Committed: Sat Jul 14 12:48:28 2018 -0500

----------------------------------------------------------------------
 .../apache/lucene/document/TestLatLonShape.java | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3b1714e7/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java b/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java
index 2ac2b39..742d03b 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/document/TestLatLonShape.java
@@ -26,6 +26,7 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
+import org.junit.Ignore;
 
 /** Test case for indexing polygons and querying by bounding box */
 public class TestLatLonShape extends LuceneTestCase {
@@ -41,39 +42,28 @@ public class TestLatLonShape extends LuceneTestCase {
     return LatLonShape.newBoxQuery(field, minLat, maxLat, minLon, maxLon);
   }
 
+  @Ignore
   public void testRandomPolygons() throws Exception {
-    long avgIdxTime = 0;
     int numVertices;
-    int numPolys = RandomNumbers.randomIntBetween(random(), 50, 100);
+    int numPolys = RandomNumbers.randomIntBetween(random(), 10, 20);
 
     Directory dir = newDirectory();
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir);
-    long start, end;
 
     Polygon polygon;
     Document document;
-    System.out.println("generating " + numPolys + " polygons");
     for (int i = 0; i < numPolys;) {
       document = new Document();
-      numVertices = TestUtil.nextInt(random(), 200000, 500000);
+      numVertices = TestUtil.nextInt(random(), 100000, 200000);
       polygon = GeoTestUtil.createRegularPolygon(0, 0, atLeast(1000000), numVertices);
-      System.out.println("adding polygon " + i);
-      start = System.currentTimeMillis();
       addPolygonsToDoc(FIELDNAME, document, polygon);
       writer.addDocument(document);
-      end = System.currentTimeMillis();
-      avgIdxTime += ((end - start) - avgIdxTime) / ++i;
     }
-    System.out.println("avg index time: " + avgIdxTime);
 
-    // search within 50km and verify we found our doc
+    // search and verify we found our doc
     IndexReader reader = writer.getReader();
     IndexSearcher searcher = newSearcher(reader);
-    start = System.currentTimeMillis();
     assertEquals(0, searcher.count(newRectQuery("field", -89.9, -89.8, -179.9, -179.8d)));
-    end = System.currentTimeMillis();
-
-    System.out.println("search: " + (end - start));
 
     reader.close();
     writer.close();


Mime
View raw message