You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2019/10/10 21:30:28 UTC
[jspwiki] branch master updated (0ea57b7 -> 25c8b72)
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git.
from 0ea57b7 added .asf.yaml to control github repository metadata
new b2cbbfb LuceneSearchProvider now uses an Executor to increase performance on searches
new fb1fcce code polish
new 66ebf1c add Awaitility as test dependency
new e6cb756 use Awaitility instead of relaying on Thread.sleep
new 6d6a6dd cut wait to a 10th, 0.2secs is enough between page saves
new 4cf5ebd use Awaitility instead of relaying on Thread.sleep
new ee62057 update libraries versions' on LICENSE
new 25c8b72 2.11.0-M6-git-01
The 8 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:
ChangeLog | 11 +-
LICENSE | 60 +++++-----
jspwiki-main/pom.xml | 6 +
.../src/main/java/org/apache/wiki/Release.java | 4 +-
.../apache/wiki/search/BasicSearchProvider.java | 18 +--
.../apache/wiki/search/LuceneSearchProvider.java | 6 +-
.../providers/BasicAttachmentProviderTest.java | 26 ++---
.../apache/wiki/providers/CachingProviderTest.java | 17 ++-
.../org/apache/wiki/search/SearchManagerTest.java | 123 ++++++++-------------
pom.xml | 7 ++
10 files changed, 142 insertions(+), 136 deletions(-)
[jspwiki] 08/08: 2.11.0-M6-git-01
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 25c8b7278b5a613f1dcff108ab4fc1417057cfc1
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:29:39 2019 +0200
2.11.0-M6-git-01
---
ChangeLog | 11 +++++++++--
jspwiki-main/src/main/java/org/apache/wiki/Release.java | 4 ++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 98e3cfd..9bc95bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,17 @@
-2019-07-09 Dirk Frederickx (brushed AT apache DOT org)
+2019-10-10 Juan Pablo Santos (juanpablo AT apache DOT org)
+
+ * 2.11.0-M6-git-01
+
+ * Introduce Awaitility to speed up tests formerly relaying on Thread.sleep(..)
+
+ * LuceneSearchProvider now uses an Executor to increase performance on searches
+
+2019-12-09 Dirk Frederickx (brushed AT apache DOT org)
* 2.11.0-M5-git-19
* Fix javascript build error, and some favicon errors.
-
2019-10-09 Juan Pablo Santos (juanpablo AT apache DOT org)
* 2.11.0-M5-git-18
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/Release.java b/jspwiki-main/src/main/java/org/apache/wiki/Release.java
index 9629946..e9d28f9 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/Release.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/Release.java
@@ -52,7 +52,7 @@ public final class Release {
* <p>
* If the POSTFIX is empty, it is not added to the version string.
*/
- private static final String POSTFIX = "M5";
+ private static final String POSTFIX = "M6";
/** The JSPWiki major version. */
public static final int VERSION = 2;
@@ -72,7 +72,7 @@ public final class Release {
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "";
+ public static final String BUILD = "git-01";
/**
* This is the generic version string you should use when printing out the version. It is of
[jspwiki] 04/08: use Awaitility instead of relaying on Thread.sleep
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit e6cb756d9cb88b58d6f5196e0d0a81c315eb5d07
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:25:22 2019 +0200
use Awaitility instead of relaying on Thread.sleep
---
.../org/apache/wiki/search/SearchManagerTest.java | 123 ++++++++-------------
1 file changed, 48 insertions(+), 75 deletions(-)
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/search/SearchManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/search/SearchManagerTest.java
index aa92b94..c831d01 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/search/SearchManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/search/SearchManagerTest.java
@@ -22,19 +22,20 @@ import net.sf.ehcache.CacheManager;
import net.sourceforge.stripes.mock.MockHttpServletRequest;
import org.apache.wiki.TestEngine;
import org.apache.wiki.WikiContext;
+import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.Properties;
+import java.util.concurrent.Callable;
+
public class SearchManagerTest {
- private static final long SLEEP_TIME = 2_000L;
- private static final int SLEEP_COUNT = 50;
TestEngine m_engine;
SearchManager m_mgr;
Properties props;
@@ -65,88 +66,69 @@ public class SearchManagerTest {
Assertions.assertEquals( "org.apache.wiki.search.LuceneSearchProvider", m_mgr.getSearchEngine().getClass().getName() );
}
- /**
- * Should cover for both index and initial delay
- */
- Collection< SearchResult > waitForIndex( String text, String testName ) throws Exception {
- Collection< SearchResult > res = null;
- for( long l = 0; l < SLEEP_COUNT; l++ ) {
- if( res == null || res.isEmpty() ) {
- Thread.sleep( SLEEP_TIME );
- } else {
- break;
+ void debugSearchResults( final Collection< SearchResult > res ) {
+ res.forEach( next -> {
+ System.out.println( "page: " + next.getPage() );
+ for( final String s : next.getContexts() ) {
+ System.out.println( "snippet: " + s );
}
- MockHttpServletRequest request = m_engine.newHttpRequest();
- WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
-
- res = m_mgr.findPages( text, ctx );
-
- // debugSearchResults( res );
- }
- return res;
+ } );
}
- void debugSearchResults( Collection< SearchResult > res ) {
- Iterator< SearchResult > iterator = res.iterator();
- while( iterator.hasNext() ) {
- SearchResult next = iterator.next();
- System.out.println( "page: " + next.getPage() );
- for( String s : next.getContexts() ) {
- System.out.println( "snippet: " + s );
- }
- }
- }
+ Callable< Boolean > findsResultsFor( final Collection< SearchResult > res, final String text ) {
+ return () -> {
+ final MockHttpServletRequest request = m_engine.newHttpRequest();
+ final WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
+ final Collection< SearchResult > search = m_mgr.findPages( text, ctx );
+ if( search != null && search.size() > 0 ) {
+ // debugSearchResults( search );
+ res.addAll( search );
+ return true;
+ }
+ return false;
+ };
+ }
@Test
public void testSimpleSearch() throws Exception {
- String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
-
+ final String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
m_engine.saveText("TestPage", txt);
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "mankind" , "testSimpleSearch" );
+ final Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testSimpleSearch" ).until( findsResultsFor( res, "mankind" ) );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage("TestPage");
}
@Test
public void testSimpleSearch2() throws Exception {
- String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
-
+ final String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
m_engine.saveText("TestPage", txt);
-
m_engine.saveText("TestPage", txt + " 2");
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "mankind" , "testSimpleSearch2" );
+ final Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testSimpleSearch2" ).until( findsResultsFor( res,"mankind" ) );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage( "TestPage" );
}
@Test
public void testSimpleSearch3() throws Exception {
- String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
-
- MockHttpServletRequest request = m_engine.newHttpRequest();
+ final String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
+ final MockHttpServletRequest request = m_engine.newHttpRequest();
request.getParameterMap().put( "page", new String[]{ "TestPage" } );
-
- WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
-
+ final WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
m_engine.saveText( ctx, txt );
-
m_engine.saveText( ctx, "The Babylon Project was a dream given form. Its goal: to prevent another war by creating a place where humans and aliens could work out their differences peacefully." );
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "Babylon" , "testSimpleSearch3" ); // wait until 2nd m_engine.saveText() takes effect
-
+ Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testSimpleSearch3" ).until( findsResultsFor( res, "Babylon" ) );
res = m_mgr.findPages( "mankind", ctx ); // check for text present in 1st m_engine.saveText() but not in 2nd
Assertions.assertNotNull( res, "found results" );
@@ -155,24 +137,20 @@ public class SearchManagerTest {
res = m_mgr.findPages( "Babylon", ctx );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage("TestPage");
}
@Test
public void testSimpleSearch4() throws Exception {
- String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
-
- MockHttpServletRequest request = m_engine.newHttpRequest();
+ final String txt = "It was the dawn of the third age of mankind, ten years after the Earth-Minbari War.";
+ final MockHttpServletRequest request = m_engine.newHttpRequest();
request.getParameterMap().put( "page", new String[]{ "TestPage" } );
-
- WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
-
+ final WikiContext ctx = m_engine.createContext( request, WikiContext.EDIT );
m_engine.saveText( ctx, txt );
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "mankind" , "testSimpleSearch4" );
+ Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testSimpleSearch4" ).until( findsResultsFor( res, "mankind" ) );
Assertions.assertNotNull( res, "found results" );
Assertions.assertEquals( 1, res.size(), "result not found" );
@@ -188,48 +166,43 @@ public class SearchManagerTest {
@Test
public void testTitleSearch() throws Exception {
- String txt = "Nonsensical content that should not match";
-
+ final String txt = "Nonsensical content that should not match";
m_engine.saveText("TestPage", txt);
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "Test" , "testTitleSearch" );
+ final Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testTitleSearch" ).until( findsResultsFor( res, "Test" ) );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage("TestPage");
}
@Test
public void testTitleSearch2() throws Exception {
- String txt = "Nonsensical content that should not match";
-
+ final String txt = "Nonsensical content that should not match";
m_engine.saveText("TestPage", txt);
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "TestPage" , "testTitleSearch2" );
+ final Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testTitleSearch2" ).until( findsResultsFor( res, "TestPage" ) );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage("TestPage");
}
@Test
public void testKeywordsSearch() throws Exception {
- String txt = "[{SET keywords=perry,mason,attorney,law}] Nonsensical content that should not match";
+ final String txt = "[{SET keywords=perry,mason,attorney,law}] Nonsensical content that should not match";
m_engine.saveText("TestPage", txt);
- Thread.yield();
- Collection< SearchResult > res = waitForIndex( "perry" , "testKeywordsSearch" );
+ final Collection< SearchResult > res = new ArrayList<>();
+ Awaitility.await( "testKeywordsSearch" ).until( findsResultsFor( res, "perry" ) );
Assertions.assertNotNull( res, "null result" );
Assertions.assertEquals( 1, res.size(), "no pages" );
-
Assertions.assertEquals( "TestPage", res.iterator().next().getPage().getName(), "page" );
m_engine.deleteTestPage("TestPage");
}
[jspwiki] 06/08: use Awaitility instead of relaying on Thread.sleep
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 4cf5ebdd4ca18bd7b560bcd2b3d79ea9f9f12b4f
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:27:31 2019 +0200
use Awaitility instead of relaying on Thread.sleep
---
.../org/apache/wiki/providers/CachingProviderTest.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/providers/CachingProviderTest.java b/jspwiki-main/src/test/java/org/apache/wiki/providers/CachingProviderTest.java
index 52023e5..5a34e13 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/providers/CachingProviderTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/providers/CachingProviderTest.java
@@ -19,22 +19,22 @@
package org.apache.wiki.providers;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.io.StringReader;
-import java.util.Properties;
-
+import net.sf.ehcache.CacheManager;
import org.apache.log4j.PropertyConfigurator;
import org.apache.wiki.TestEngine;
import org.apache.wiki.WikiPage;
import org.apache.wiki.util.FileUtil;
+import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import net.sf.ehcache.CacheManager;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.util.Properties;
public class CachingProviderTest
{
@@ -105,8 +105,7 @@ public class CachingProviderTest
FileUtil.copyContents( new StringReader(content), out );
out.close();
- Thread.sleep( 4000L ); // Make sure we wait long enough
-
+ Awaitility.await( "testSneakyAdd" ).until( () -> engine.getPage( "Testi" ) != null );
WikiPage p = engine.getPage( "Testi" );
Assertions.assertNotNull( p, "page did not exist?" );
[jspwiki] 05/08: cut wait to a 10th,
0.2secs is enough between page saves
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 6d6a6dd81f0e362a6ed60ca22aeb5f4e5af0f2e6
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:26:34 2019 +0200
cut wait to a 10th, 0.2secs is enough between page saves
---
.../providers/BasicAttachmentProviderTest.java | 26 +++++++++++-----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/providers/BasicAttachmentProviderTest.java b/jspwiki-main/src/test/java/org/apache/wiki/providers/BasicAttachmentProviderTest.java
index a36aa85..c6b5675 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/providers/BasicAttachmentProviderTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/providers/BasicAttachmentProviderTest.java
@@ -19,14 +19,6 @@
package org.apache.wiki.providers;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.StringReader;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
import org.apache.wiki.TestEngine;
import org.apache.wiki.attachment.Attachment;
import org.apache.wiki.util.FileUtil;
@@ -35,6 +27,14 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.StringReader;
+import java.util.Date;
+import java.util.List;
+import java.util.Properties;
+
public class BasicAttachmentProviderTest
{
public static final String NAME1 = "TestPage";
@@ -193,7 +193,7 @@ public class BasicAttachmentProviderTest
m_provider.putAttachmentData( att, new FileInputStream(in) );
- Thread.sleep( 2000L ); // So that we get a bit of granularity.
+ Thread.sleep( 200L ); // So that we get a bit of granularity.
Attachment att2 = new Attachment( m_engine, NAME2, "test2.txt" );
@@ -229,7 +229,7 @@ public class BasicAttachmentProviderTest
m_provider.putAttachmentData( att, new FileInputStream(in) );
- Thread.sleep( 2000L ); // So that we get a bit of granularity.
+ Thread.sleep( 200L ); // So that we get a bit of granularity.
Attachment att2 = new Attachment( m_engine, NAME2, "test2.txt" );
@@ -273,7 +273,7 @@ public class BasicAttachmentProviderTest
try
{
- Thread.sleep( 2000L ); // So that we get a bit of granularity.
+ Thread.sleep( 200L ); // So that we get a bit of granularity.
Attachment att2 = new Attachment( m_engine, NAME2, "test2.txt" );
@@ -318,7 +318,7 @@ public class BasicAttachmentProviderTest
try
{
- Thread.sleep( 2000L ); // So that we get a bit of granularity.
+ Thread.sleep( 200L ); // So that we get a bit of granularity.
Attachment att2 = new Attachment( m_engine, NAME2, "test2.txt" );
@@ -350,7 +350,7 @@ public class BasicAttachmentProviderTest
m_provider.putAttachmentData( att, new FileInputStream(in) );
- Thread.sleep( 2000L ); // So that we get a bit of granularity.
+ Thread.sleep( 200L ); // So that we get a bit of granularity.
Attachment att2 = new Attachment( m_engine, NAME2, "test2." );
[jspwiki] 03/08: add Awaitility as test dependency
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 66ebf1ce4e72a3c4cd5a3ddb203735e93c831ddf
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:23:42 2019 +0200
add Awaitility as test dependency
---
jspwiki-main/pom.xml | 6 ++++++
pom.xml | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/jspwiki-main/pom.xml b/jspwiki-main/pom.xml
index e739cb0..36f311b 100644
--- a/jspwiki-main/pom.xml
+++ b/jspwiki-main/pom.xml
@@ -172,6 +172,12 @@
</dependency>
<dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.hsqldb</groupId>
<artifactId>sqltool</artifactId>
<scope>test</scope>
diff --git a/pom.xml b/pom.xml
index 4d623d0..82d54ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,7 @@
<maven.version>3.5</maven.version>
<akismet-java.version>1.02</akismet-java.version>
+ <awaitility.version>4.0.1</awaitility.version>
<commons-fileupload.version>1.4</commons-fileupload.version>
<commons-httpclient.version>3.1</commons-httpclient.version>
<commons-io.version>2.6</commons-io.version>
@@ -304,6 +305,12 @@
<version>${stripes.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <version>${awaitility.version}</version>
+ </dependency>
+
<!--
Note: As Jetty activates during the build, can upgrade
only to the latest Jetty version that can run on the
[jspwiki] 07/08: update libraries versions' on LICENSE
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit ee62057cd0ae2cfe7877131ac25aa41c69a95099
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:28:43 2019 +0200
update libraries versions' on LICENSE
---
LICENSE | 60 +++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 35 insertions(+), 25 deletions(-)
diff --git a/LICENSE b/LICENSE
index 666473f..eb5c805 100644
--- a/LICENSE
+++ b/LICENSE
@@ -212,50 +212,54 @@ akismet-java-1.02.jar ./jspwiki-war/src/main/config/doc/LI
commons-codec-1.3.jar LICENSE
commons-fileupload-1.4.jar LICENSE
commons-httpclient-3.1.jar LICENSE
-commons-io-2.4.jar LICENSE
-commons-lang-2.6.jar LICENSE
+commons-io-2.6.jar LICENSE
+commons-lang-3.9.jar LICENSE
+commons-text-1.8.jar LICENSE
commons-logging-1.0.4.jar LICENSE
ehcache-2.10.6.jar LICENSE
-flexmark-0.40.8.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-ext-footnotes-0.40.8.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-ext-toc-0.40.8.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-formatter-0.40.8.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-util-0.40.8.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-0.50.40.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-ext-footnotes-0.50.40.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-ext-toc-0.50.40.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-formatter-0.50.40.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-util-0.50.40.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
freshcookies-security-0.60.jar LICENSE
gson-2.3.1 LICENSE
-jaxen-1.1.4.jar ./jspwiki-war/src/main/config/doc/LICENSE.jaxen
-jdom2-2.0.5.jar ./jspwiki-war/src/main/config/doc/LICENSE.jdom
+jaxen-1.2.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.jaxen
+jdom2-2.0.6.jar ./jspwiki-war/src/main/config/doc/LICENSE.jdom
jstl-1.2.jar LICENSE
log4j-1.2.17.jar LICENSE
-lucene-analyzers-common-7.6.0 LICENSE
-lucene-core-7.6.0.jar LICENSE
-lucene-highlighter-7.6.0.jar LICENSE
-lucene-memory-7.6.0.jar LICENSE
-lucene-queries-7.6.0 LICENSE
-lucene-queryparser-7.6.0 LICENSE
-lucene-sandbox-7.6.0 LICENSE
+lucene-analyzers-common-8.2.0.jar LICENSE
+lucene-core-8.2.0.jar LICENSE
+lucene-highlighter-8.2.0.jar LICENSE
+lucene-memory-8.2.0.jar LICENSE
+lucene-queries-8.2.0.jar LICENSE
+lucene-queryparser-8.2.0.jar LICENSE
+lucene-sandbox-8.2.0.jar LICENSE
mail-1.4.7.jar ./jspwiki-war/src/main/config/doc/LICENSE.cddl
-nekohtml-1.9.21.jar LICENSE
+nekohtml-1.9.22.jar LICENSE
org.suigeneris.jrcs.diff-0.4.2 LICENSE
oro-2.0.8.jar LICENSE
sandler-0.5.jar ./jspwiki-war/src/main/config/doc/LICENSE.sandler
-slf4-api-1.7.25.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
-slf4j-log4j-1.7.25.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+slf4-api-1.7.28.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+slf4j-log4j-1.7.28.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
xercesImpl-2.10.0.jar LICENSE
+tika-core-1.22.jar LICENSE
+tika-parsers-1.22.jar LICENSE
xml-apis-1.4.01 LICENSE
xmlrpc-2.0.1.jar LICENSE
xpp3-1.1.3.4-RC3 ./jspwiki-war/src/main/config/doc/LICENSE.cc-cod
TEST LIBRARY LICENSE FILE
=============================================================================================================
+awaitility-4.0.1.jar LICENSE
commons-el-1.0.jar LICENSE
custom_rhino-0.4.3.jar ./jspwiki-war/src/main/config/doc/LICENSE.mpl
-hsqldb-2.4.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
-sqltool-2.4.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
+hsqldb-2.5.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
+sqltool-2.5.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
jetty-all-8.1.15.v20140411.jar LICENSE
-junit-4.12.jar ./jspwiki-war/src/main/config/doc/LICENSE.cpl
-selenide-5.1.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
-stripes-1.6.0.jar LICENSE
+junit-5.5.2 ./jspwiki-war/src/main/config/doc/LICENSE.cpl
+selenide-5.3.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+stripes-1.7.0-async.jar LICENSE
yuicompressor-2.4.7.jar ./jspwiki-war/src/main/config/doc/LICENSE.yui
JS LIBRARY LICENSE FILE
@@ -270,6 +274,12 @@ SlimBox ./jspwiki-war/src/main/config/doc/LI
RESOURCES LICENSE FILE
=============================================================================================================
+Apache Tomcat 8.5.45 LICENSE
Font Awesome (CSS & LESS files) ./jspwiki-war/src/main/config/doc/LICENSE.mit
Font Awesome (Fonts) ./jspwiki-war/src/main/config/doc/LICENSE.ofl
-SilkIconSet ./jspwiki-war/src/main/config/doc/LICENSE.SilkIconSet
\ No newline at end of file
+SilkIconSet ./jspwiki-war/src/main/config/doc/LICENSE.SilkIconSet
+
+OTHER
+=============================================================================================================
+While not bundled by default, Apache Tika extracts content from a lot of different file formats using several
+OSS libraries, which can be consulted at https://tika.apache.org/1.22/formats.html
\ No newline at end of file
[jspwiki] 01/08: LuceneSearchProvider now uses an Executor to
increase performance on searches
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit b2cbbfbe547ec9a4db0f25c9c4f0616b30b3b246
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:22:06 2019 +0200
LuceneSearchProvider now uses an Executor to increase performance on searches
see http://blog.mikemccandless.com/2019/10/concurrent-query-execution-in-apache.html for details
---
.../src/main/java/org/apache/wiki/search/LuceneSearchProvider.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java b/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
index 5e3f732..5bb618d 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
@@ -78,6 +78,8 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Properties;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
/**
@@ -90,6 +92,7 @@ public class LuceneSearchProvider implements SearchProvider {
protected static final Logger log = Logger.getLogger(LuceneSearchProvider.class);
private WikiEngine m_engine;
+ private Executor searchExecutor;
// Lucene properties.
@@ -134,6 +137,7 @@ public class LuceneSearchProvider implements SearchProvider {
throws NoRequiredPropertyException, IOException
{
m_engine = engine;
+ searchExecutor = Executors.newCachedThreadPool();
m_luceneDirectory = engine.getWorkDir()+File.separator+LUCENE_DIR;
@@ -519,7 +523,7 @@ public class LuceneSearchProvider implements SearchProvider {
final String[] queryfields = { LUCENE_PAGE_CONTENTS, LUCENE_PAGE_NAME, LUCENE_AUTHOR, LUCENE_ATTACHMENTS, LUCENE_PAGE_KEYWORDS };
final QueryParser qp = new MultiFieldQueryParser( queryfields, getLuceneAnalyzer() );
final Query luceneQuery = qp.parse( query );
- final IndexSearcher searcher = new IndexSearcher( reader );
+ final IndexSearcher searcher = new IndexSearcher( reader, searchExecutor );
if( (flags & FLAG_CONTEXTS) != 0 ) {
highlighter = new Highlighter(new SimpleHTMLFormatter("<span class=\"searchmatch\">", "</span>"),
[jspwiki] 02/08: code polish
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit fb1fcceac48882fb54f7298db38bc457e6a938b2
Author: juanpablo <ju...@apache.org>
AuthorDate: Thu Oct 10 23:22:45 2019 +0200
code polish
---
.../org/apache/wiki/search/BasicSearchProvider.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/search/BasicSearchProvider.java b/jspwiki-main/src/main/java/org/apache/wiki/search/BasicSearchProvider.java
index 0d95d7f..3f2d58b 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/search/BasicSearchProvider.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/search/BasicSearchProvider.java
@@ -18,14 +18,6 @@
*/
package org.apache.wiki.search;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-
import org.apache.log4j.Logger;
import org.apache.wiki.WikiContext;
import org.apache.wiki.WikiEngine;
@@ -37,6 +29,14 @@ import org.apache.wiki.auth.AuthorizationManager;
import org.apache.wiki.auth.permissions.PagePermission;
import org.apache.wiki.providers.WikiPageProvider;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
/**
* Interface for the search providers that handle searching the Wiki
*
@@ -167,7 +167,7 @@ public class BasicSearchProvider implements SearchProvider
Iterator< WikiPage > it = allPages.iterator();
while( it.hasNext() ) {
try {
- WikiPage page = (WikiPage) it.next();
+ WikiPage page = it.next();
if (page != null) {
PagePermission pp = new PagePermission( page, PagePermission.VIEW_ACTION );