You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/10 05:24:03 UTC

[lucene-solr] branch reference_impl updated: #47 Knock down a couple long tail tests and a resource abuser.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 2856b0a  #47 Knock down a couple long tail tests and a resource abuser.
2856b0a is described below

commit 2856b0a307d85c261d24dfa73ceed9539dfb6dfa
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Fri Jul 10 00:23:46 2020 -0500

    #47 Knock down a couple long tail tests and a resource abuser.
---
 .../org/apache/solr/handler/component/StatsComponentTest.java     | 4 +++-
 .../org/apache/solr/search/facet/TestJsonFacetRefinement.java     | 1 +
 .../src/test/org/apache/solr/store/blockcache/BlockCacheTest.java | 8 ++++----
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
index 497e54c..9976c24 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
@@ -78,6 +78,7 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
     assertU(commit());
   }
 
+  @Nightly
   public void testStats() throws Exception {
     for (String f : new String[] {
             "stats_i","stats_l","stats_f","stats_d",
@@ -1328,7 +1329,8 @@ public class StatsComponentTest extends SolrTestCaseJ4 {
       ALL.put(stat, new ExpectedStat(stat, input, perShardXpaths, finalXpaths));
     }
   }
-  
+
+  @Nightly
   public void testIndividualStatLocalParams() throws Exception {
     final String kpre = ExpectedStat.KPRE;
     
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
index 1d844e6..3653000 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetRefinement.java
@@ -1019,6 +1019,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
 
   
   @Test
+  @Nightly
   public void testBasicRefinement() throws Exception {
     ModifiableSolrParams p;
     p = params("cat_s", "cat_s", "cat_i", "cat_i", "date","cat_dt", "xy_s", "xy_s", "num_d", "num_d", "qw_s", "qw_s", "er_s", "er_s");
diff --git a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java b/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java
index e612a9b..2bf65ae 100644
--- a/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java
+++ b/solr/core/src/test/org/apache/solr/store/blockcache/BlockCacheTest.java
@@ -43,7 +43,7 @@ public class BlockCacheTest extends SolrTestCase {
 
   @Test
   public void testBlockCache() {
-    int blocksInTest = 2000000;
+    int blocksInTest = TEST_NIGHTLY ? 2000000 : 20000;
     int blockSize = 1024;
 
     int slabSize = blockSize * 4096;
@@ -57,7 +57,7 @@ public class BlockCacheTest extends SolrTestCase {
     AtomicLong missesInCache = new AtomicLong();
     long storeTime = 0;
     long fetchTime = 0;
-    int passes = 10000;
+    int passes = TEST_NIGHTLY ?  10000 : 10;
 
     BlockCacheKey blockCacheKey = new BlockCacheKey();
 
@@ -112,7 +112,7 @@ public class BlockCacheTest extends SolrTestCase {
   public void testBlockCacheConcurrent() throws Exception {
     Random rnd = random();
 
-    final int blocksInTest = 400;  // pick something bigger than 256, since that would lead to a slab size of 64 blocks and the bitset locks would consist of a single word.
+    final int blocksInTest = TEST_NIGHTLY ? 400 : 40;  // pick something bigger than 256, since that would lead to a slab size of 64 blocks and the bitset locks would consist of a single word.
     final int blockSize = 64;
     final int slabSize = blocksInTest * blockSize / 4;
     final long totalMemory = 2 * slabSize;  // 2 slabs of memory, so only half of what is needed for all blocks
@@ -124,7 +124,7 @@ public class BlockCacheTest extends SolrTestCase {
      final long totalMemory = 2 * slabSize;  // 2 slabs of memory, so only half of what is needed for all blocks
      ***/
 
-    final int nThreads = 64;
+    final int nThreads = TEST_NIGHTLY ? Runtime.getRuntime().availableProcessors() : 5;
     final int nReads = 1000000;
     final int readsPerThread = nReads / nThreads;
     final int readLastBlockOdds = 10; // odds (1 in N) of the next block operation being on the same block as the previous operation... helps flush concurrency issues