You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2019/06/20 16:33:38 UTC

[lucene-solr] branch master updated (54c5b8a -> df3011a)

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

romseygeek pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from 54c5b8a  SOLR-13523: Fix Atomic Updates when _nest_path_ is declared. Change the most common test schema to include this field so we better test our code paths.
     new 371f50a  LUCENE-8766: Fix timing problem in test
     new df3011a  LUCENE-8766: Add monitor sub-project to smoke tester

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-tools/scripts/smokeTestRelease.py                     |  2 +-
 .../test/org/apache/lucene/monitor/TestCachePurging.java  | 15 ++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)


[lucene-solr] 02/02: LUCENE-8766: Add monitor sub-project to smoke tester

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit df3011a5391f548db9db34abc7d5e158d582f871
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Mon Jun 17 14:19:21 2019 +0100

    LUCENE-8766: Add monitor sub-project to smoke tester
---
 dev-tools/scripts/smokeTestRelease.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index aa7e0ca..a1738fb 100755
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -621,7 +621,7 @@ def verifyUnpacked(java, project, artifact, unpackPath, gitRevision, version, te
 
   if project == 'lucene':
     # TODO: clean this up to not be a list of modules that we must maintain
-    extras = ('analysis', 'backward-codecs', 'benchmark', 'classification', 'codecs', 'core', 'demo', 'docs', 'expressions', 'facet', 'grouping', 'highlighter', 'join', 'luke', 'memory', 'misc', 'queries', 'queryparser', 'replicator', 'sandbox', 'spatial', 'spatial-extras', 'spatial3d', 'suggest', 'test-framework', 'licenses')
+    extras = ('analysis', 'backward-codecs', 'benchmark', 'classification', 'codecs', 'core', 'demo', 'docs', 'expressions', 'facet', 'grouping', 'highlighter', 'join', 'luke', 'memory', 'misc', 'monitor', 'queries', 'queryparser', 'replicator', 'sandbox', 'spatial', 'spatial-extras', 'spatial3d', 'suggest', 'test-framework', 'licenses')
     if isSrc:
       extras += ('build.xml', 'common-build.xml', 'module-build.xml', 'top-level-ivy-settings.xml', 'default-nested-ivy-settings.xml', 'ivy-versions.properties', 'ivy-ignore-conflicts.properties', 'version.properties', 'tools', 'site')
   else:


[lucene-solr] 01/02: LUCENE-8766: Fix timing problem in test

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 371f50acc2630109e30a3cc8536691e954874852
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Mon Jun 17 14:18:28 2019 +0100

    LUCENE-8766: Fix timing problem in test
---
 .../test/org/apache/lucene/monitor/TestCachePurging.java  | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lucene/monitor/src/test/org/apache/lucene/monitor/TestCachePurging.java b/lucene/monitor/src/test/org/apache/lucene/monitor/TestCachePurging.java
index 8291e48..3e87071 100644
--- a/lucene/monitor/src/test/org/apache/lucene/monitor/TestCachePurging.java
+++ b/lucene/monitor/src/test/org/apache/lucene/monitor/TestCachePurging.java
@@ -132,7 +132,7 @@ public class TestCachePurging extends MonitorTestBase {
 
   public void testBackgroundPurges() throws IOException, InterruptedException {
 
-    MonitorConfiguration config = new MonitorConfiguration().setPurgeFrequency(1, TimeUnit.SECONDS);
+    MonitorConfiguration config = new MonitorConfiguration().setPurgeFrequency(50, TimeUnit.MILLISECONDS);
     try (Monitor monitor = new Monitor(ANALYZER, Presearcher.NO_FILTERING, config)) {
 
       assertEquals(-1, monitor.getQueryCacheStats().lastPurged);
@@ -140,11 +140,20 @@ public class TestCachePurging extends MonitorTestBase {
       for (int i = 0; i < 100; i++) {
         monitor.register(newMonitorQuery(i));
       }
+      assertEquals(100, monitor.getQueryCacheStats().cachedQueries);
+
       monitor.deleteById("5");
       assertEquals(99, monitor.getQueryCacheStats().queries);
-      assertEquals(100, monitor.getQueryCacheStats().cachedQueries);
 
-      TimeUnit.SECONDS.sleep(2);
+      CountDownLatch latch = new CountDownLatch(1);
+      monitor.addQueryIndexUpdateListener(new MonitorUpdateListener() {
+        @Override
+        public void onPurge() {
+          latch.countDown();
+        }
+      });
+
+      assertTrue(latch.await(5, TimeUnit.SECONDS));
       assertEquals(99, monitor.getQueryCacheStats().queries);
       assertEquals(99, monitor.getQueryCacheStats().cachedQueries);
       assertTrue(monitor.getQueryCacheStats().lastPurged > 0);