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 2022/05/01 12:55:19 UTC

[jspwiki] branch master updated (79558a7f8 -> 17b28348b)

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 79558a7f8 2.11.3-git-07
     new 31a063321 TestEngine#shutdown() now cleans cache, wiki pages dir and their associated attachments, if any
     new 7535118e8 Explicit generic parameters on getPageInfo and getPageInfoVersion
     new f022e411f Clean up a handful of tests
     new 68faee535 Update doclet version for JDK >= 9
     new 0c5b903be Update dependencies
     new a407a7116 update with latest updated versions
     new 17b28348b 2.11.3-git-08

The 7 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.md                                       | 12 +++
 LICENSE                                            |  8 +-
 .../src/main/java/org/apache/wiki/api/Release.java |  2 +-
 .../search/kendra/KendraSearchProviderTest.java    |  2 +-
 .../java/org/apache/wiki/xmlrpc/RPCHandler.java    |  4 +-
 .../src/test/java/org/apache/wiki/TestEngine.java  | 18 ++++-
 .../test/java/org/apache/wiki/WikiEngineTest.java  | 14 +---
 .../wiki/attachment/AttachmentManagerTest.java     | 14 +---
 .../org/apache/wiki/content/PageRenamerTest.java   | 18 -----
 .../apache/wiki/pages/DefaultPageManagerTest.java  |  7 --
 .../wiki/parser/JSPWikiMarkupParserTest.java       | 13 +---
 .../wiki/plugin/ReferringPagesPluginTest.java      |  3 +-
 .../providers/BasicAttachmentProviderTest.java     | 38 +++++-----
 .../apache/wiki/providers/CachingProviderTest.java | 20 ++---
 .../wiki/providers/VersioningFileProviderTest.java |  7 --
 .../wiki/references/ReferenceManagerTest.java      |  7 --
 .../apache/wiki/render/RenderingManagerTest.java   | 12 +--
 .../org/apache/wiki/search/SearchManagerTest.java  |  3 +-
 .../apache/wiki/stress/MassiveRepositoryTest.java  |  5 --
 .../wiki/stress/StressTestVersioningProvider.java  | 70 ++++++-----------
 .../java/org/apache/wiki/web/TestContainer.java    | 88 +++++++---------------
 .../org/apache/wiki/xmlrpc/RPCHandlerTest.java     | 23 +++---
 .../wiki/render/markdown/MarkdownRendererTest.java |  5 --
 mvn_cheat-sheet.md                                 |  2 +-
 pom.xml                                            |  4 +-
 25 files changed, 137 insertions(+), 262 deletions(-)


[jspwiki] 05/07: Update dependencies

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 0c5b903bea2803a71d1283729a488bcd7b87a2b6
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:52:36 2022 +0200

    Update dependencies
    
    * Jetty to 9.4.46.v20220331 - closes #181
    * Mockito to 4.5.1 - closes #185
    * Maven project info reports plugin to 3.3.0 - closes #186
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index c2d0e7de2..41dcbf063 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@
     <junit.version>5.8.2</junit.version>
     <log4j2.version>2.17.2</log4j2.version>
     <lucene.version>8.11.1</lucene.version> <!-- 9.0.0 and above require JDK >= 11 to execute -->
-    <mockito.version>4.5.0</mockito.version>
+    <mockito.version>4.5.1</mockito.version>
     <nekohtml.version>2.0.2</nekohtml.version> <!-- 2.1.0 and above require JDK >= 11 to execute -->
     <oro.version>2.0.8</oro.version>
     <sandler.version>0.5</sandler.version>
@@ -92,7 +92,7 @@
     <plugin.jar.version>3.2.2</plugin.jar.version>
     <plugin.javadoc.version>3.4.0</plugin.javadoc.version>
     <plugin.jxr.version>3.2.0</plugin.jxr.version>
-    <plugin.project-info-reports.version>3.2.2</plugin.project-info-reports.version>
+    <plugin.project-info-reports.version>3.3.0</plugin.project-info-reports.version>
     <plugin.release.version>3.0.0-M5</plugin.release.version>
     <plugin.resources.version>3.2.0</plugin.resources.version>
     <plugin.source.version>3.2.1</plugin.source.version>


[jspwiki] 03/07: Clean up a handful of tests

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 f022e411fbd03fe951ef1f833a432445d6de74d0
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:50:19 2022 +0200

    Clean up a handful of tests
---
 .../search/kendra/KendraSearchProviderTest.java    |  2 +-
 .../test/java/org/apache/wiki/WikiEngineTest.java  | 14 +---
 .../wiki/attachment/AttachmentManagerTest.java     | 14 +---
 .../org/apache/wiki/content/PageRenamerTest.java   | 18 -----
 .../apache/wiki/pages/DefaultPageManagerTest.java  |  7 --
 .../wiki/parser/JSPWikiMarkupParserTest.java       | 13 +---
 .../wiki/plugin/ReferringPagesPluginTest.java      |  3 +-
 .../providers/BasicAttachmentProviderTest.java     | 38 +++++-----
 .../apache/wiki/providers/CachingProviderTest.java | 20 ++---
 .../wiki/providers/VersioningFileProviderTest.java |  7 --
 .../wiki/references/ReferenceManagerTest.java      |  7 --
 .../apache/wiki/render/RenderingManagerTest.java   | 12 +--
 .../org/apache/wiki/search/SearchManagerTest.java  |  3 +-
 .../apache/wiki/stress/MassiveRepositoryTest.java  |  5 --
 .../wiki/stress/StressTestVersioningProvider.java  | 70 ++++++-----------
 .../java/org/apache/wiki/web/TestContainer.java    | 88 +++++++---------------
 .../org/apache/wiki/xmlrpc/RPCHandlerTest.java     | 23 +++---
 .../wiki/render/markdown/MarkdownRendererTest.java |  5 --
 18 files changed, 100 insertions(+), 249 deletions(-)

diff --git a/jspwiki-kendra-searchprovider/src/test/java/org/apache/wiki/search/kendra/KendraSearchProviderTest.java b/jspwiki-kendra-searchprovider/src/test/java/org/apache/wiki/search/kendra/KendraSearchProviderTest.java
index 3f11e46e8..5947b4a12 100644
--- a/jspwiki-kendra-searchprovider/src/test/java/org/apache/wiki/search/kendra/KendraSearchProviderTest.java
+++ b/jspwiki-kendra-searchprovider/src/test/java/org/apache/wiki/search/kendra/KendraSearchProviderTest.java
@@ -58,7 +58,7 @@ public class KendraSearchProviderTest {
     void setUp( final TestInfo testInfo ) throws Exception {
         TestEngine.emptyWorkDir( props );
 
-        // before each test I setup the Kendra Client
+        // before each test I set up the Kendra Client
         searchProvider = new KendraSearchProvider() {
             @Override
             protected AWSkendra buildClient() {
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/WikiEngineTest.java b/jspwiki-main/src/test/java/org/apache/wiki/WikiEngineTest.java
index 402e52dc7..054af5843 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/WikiEngineTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/WikiEngineTest.java
@@ -54,29 +54,19 @@ class WikiEngineTest {
 
     @AfterEach
     void tearDown() {
-        final String files = m_engine.getWikiProperties().getProperty( FileSystemProvider.PROP_PAGEDIR );
-
-        if( files != null ) {
-            final File f = new File( files );
-            TestEngine.deleteAll( f );
-        }
-
-        TestEngine.emptyWorkDir();
         m_engine.stop();
     }
 
     @Test
-    void testNonExistentDirectory() throws Exception {
+    void testNonExistentDirectory() {
         final String newdir = "." + File.separator + "target" + File.separator + "non-existent-directory";
 
         props.setProperty( FileSystemProvider.PROP_PAGEDIR, newdir );
-        m_engine = new TestEngine( props );
+        m_engine = TestEngine.build( props );
 
         final File f = new File( m_engine.getWikiProperties().getProperty( FileSystemProvider.PROP_PAGEDIR ) );
         Assertions.assertTrue( f.exists(), "didn't create it" );
         Assertions.assertTrue( f.isDirectory(), "isn't a dir" );
-
-        f.delete();
     }
 
     @Test
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/attachment/AttachmentManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/attachment/AttachmentManagerTest.java
index 3021d5cfa..e57861efa 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/attachment/AttachmentManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/attachment/AttachmentManagerTest.java
@@ -39,16 +39,13 @@ public class AttachmentManagerTest {
     public static final String NAME1 = "TestPage";
     public static final String NAMEU = "TestPage\u00e6";
 
-    TestEngine m_engine;
-    AttachmentManager m_manager;
+    TestEngine m_engine = TestEngine.build();
+    AttachmentManager m_manager = m_engine.getManager( AttachmentManager.class );
 
     static String c_fileContents = "ABCDEFGHIJKLMNOPQRSTUVWxyz";
 
     @BeforeEach
     public void setUp() throws Exception {
-        m_engine  = TestEngine.build();
-        m_manager = m_engine.getManager( AttachmentManager.class );
-
         m_engine.saveText( NAME1, "Foobar" );
         m_engine.saveText( NAMEU, "Foobar" );
     }
@@ -65,14 +62,7 @@ public class AttachmentManagerTest {
 
     @AfterEach
     public void tearDown() {
-        m_engine.deleteTestPage( NAME1 );
-        m_engine.deleteTestPage( NAMEU );
         m_engine.stop();
-
-        TestEngine.deleteAttachments(NAME1);
-        TestEngine.deleteAttachments(NAMEU);
-
-        TestEngine.emptyWorkDir();
     }
 
     @Test
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/content/PageRenamerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/content/PageRenamerTest.java
index 492e95174..1f8b197e9 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/content/PageRenamerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/content/PageRenamerTest.java
@@ -44,24 +44,6 @@ public class PageRenamerTest {
 
     @AfterEach
     public void tearDown() {
-        m_engine.deleteTestPage("TestPage");
-        m_engine.deleteTestPage("TestPage2");
-        m_engine.deleteTestPage("FooTest");
-        m_engine.deleteTestPage("Test");
-        m_engine.deleteTestPage("CdauthNew");
-        m_engine.deleteTestPage("Cdauth");
-        m_engine.deleteTestPage("TestPageReferring");
-        m_engine.deleteTestPage("TestPageReferredNew");
-        m_engine.deleteTestPage("Main");
-        m_engine.deleteTestPage("Main8887");
-        m_engine.deleteTestPage("TestPage1234");
-        m_engine.deleteTestPage("TestPageReferred");
-        m_engine.deleteTestPage("RenameTest");
-        m_engine.deleteTestPage("Link one");
-        m_engine.deleteTestPage("Link uno");
-        m_engine.deleteTestPage("Link two");
-
-        TestEngine.emptyWorkDir();
         m_engine.stop();
     }
 
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/pages/DefaultPageManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/pages/DefaultPageManagerTest.java
index f794b4c90..d7ac202f4 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/pages/DefaultPageManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/pages/DefaultPageManagerTest.java
@@ -49,13 +49,6 @@ public class DefaultPageManagerTest {
 
     @AfterEach
     public void tearDown() {
-        final String files = engine.getWikiProperties().getProperty( FileSystemProvider.PROP_PAGEDIR );
-        if( files != null ) {
-            final File f = new File( files );
-            TestEngine.deleteAll( f );
-        }
-
-        TestEngine.emptyWorkDir();
         engine.stop();
     }
 
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java b/jspwiki-main/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
index 10de0788e..38ba1ebc8 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/parser/JSPWikiMarkupParserTest.java
@@ -59,7 +59,7 @@ public class JSPWikiMarkupParserTest {
 
     @AfterEach
     public void tearDown() {
-        deleteCreatedPages();
+        created.clear();
         testEngine.stop();
     }
 
@@ -68,15 +68,6 @@ public class JSPWikiMarkupParserTest {
         created.addElement( name );
     }
 
-    private void deleteCreatedPages() {
-        for ( final String name : created ) {
-            testEngine.deleteTestPage( name );
-            TestEngine.deleteAttachments( name );
-        }
-
-        created.clear();
-    }
-
     private String translate( final String src ) throws IOException {
         return translate( Wiki.contents().page( testEngine, PAGE_NAME ), src );
     }
@@ -96,7 +87,7 @@ public class JSPWikiMarkupParserTest {
         return conv.getString();
     }
 
-    private String translate_nofollow( final String src ) throws IOException, WikiException {
+    private String translate_nofollow( final String src ) throws IOException {
         final TestEngine testEngine2 = TestEngine.build( with( "jspwiki.translatorReader.useRelNofollow", "true" ) );
         final WikiContext context = new WikiContext( testEngine2, Wiki.contents().page( testEngine2, PAGE_NAME ) );
         final JSPWikiMarkupParser r = new JSPWikiMarkupParser( context, new BufferedReader( new StringReader( src ) ) );
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/plugin/ReferringPagesPluginTest.java b/jspwiki-main/src/test/java/org/apache/wiki/plugin/ReferringPagesPluginTest.java
index 4cde71582..7da2f60c9 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/plugin/ReferringPagesPluginTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/plugin/ReferringPagesPluginTest.java
@@ -34,7 +34,8 @@ import static org.apache.wiki.TestEngine.with;
 
 public class ReferringPagesPluginTest  {
 
-    static TestEngine engine = TestEngine.build( with( "jspwiki.breakTitleWithSpaces", "false" ) );
+    static TestEngine engine = TestEngine.build( with( "jspwiki.breakTitleWithSpaces", "false" ),
+                                                 with( "jspwiki.cache.enable", "false" ) );
     static PluginManager manager = engine.getManager( PluginManager.class );
     Context context;
 
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 82b89bf41..f5692d215 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
@@ -25,17 +25,17 @@ import org.apache.wiki.api.spi.Wiki;
 import org.apache.wiki.util.FileUtil;
 import org.awaitility.Awaitility;
 import org.awaitility.core.ConditionFactory;
+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.io.File;
-import java.io.FileInputStream;
 import java.io.FileWriter;
 import java.io.StringReader;
+import java.nio.file.Files;
 import java.util.Date;
 import java.util.List;
-import java.util.Properties;
 import java.util.concurrent.Callable;
 
 
@@ -43,9 +43,7 @@ public class BasicAttachmentProviderTest {
 
     public static final String NAME1 = "FirstTestPage";
     public static final String NAME2 = "AfterFirstTestPage";
-
-    Properties props = TestEngine.getTestProperties();
-    TestEngine m_engine = TestEngine.build( props );
+    TestEngine m_engine;
     BasicAttachmentProvider m_provider;
 
     /** This is the sound of my head hitting the keyboard. */
@@ -53,12 +51,18 @@ public class BasicAttachmentProviderTest {
 
     @BeforeEach
     public void setUp() throws Exception {
+        m_engine = TestEngine.build();
         m_provider = new BasicAttachmentProvider();
-        m_provider.initialize( m_engine, props );
+        m_provider.initialize( m_engine, m_engine.getWikiProperties() );
 
         m_engine.saveText( NAME1, "Foobar" );
         m_engine.saveText( NAME2, "Foobar2" );
     }
+    
+    @AfterEach
+    void tearDown() {
+        m_engine.stop();
+    }
 
     private File makeAttachmentFile() throws Exception {
         final File tmpFile = File.createTempFile("test-",".txt");
@@ -123,7 +127,7 @@ public class BasicAttachmentProviderTest {
         final File in = makeAttachmentFile();
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "\u3072\u3048\u308b\u00e5\u00e4\u00f6test.f\u00fc\u00fc" );
 
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
         final List< Attachment > res = m_provider.listAllChanged( new Date(0L) );
         final Attachment a0 = res.get(0);
 
@@ -163,12 +167,12 @@ public class BasicAttachmentProviderTest {
     public void testListAll() throws Exception {
         final File in = makeAttachmentFile();
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1.txt" );
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
 
         awaitility().await( "testListAll" ).until( attachmentIsSaved( att ) );
 
         final Attachment att2 = Wiki.contents().attachment( m_engine, NAME2, "test2.txt" );
-        m_provider.putAttachmentData( att2, new FileInputStream(in) );
+        m_provider.putAttachmentData( att2, Files.newInputStream( in.toPath() ) );
 
         final List< Attachment > res = m_provider.listAllChanged( new Date(0L) );
 
@@ -192,12 +196,12 @@ public class BasicAttachmentProviderTest {
         makeExtraFile( sDir, "foobar.blob" );
 
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1.txt" );
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
 
         awaitility().await( "testListAllExtrafile" ).until( attachmentIsSaved( att ) );
 
         final Attachment att2 = Wiki.contents().attachment( m_engine, NAME2, "test2.txt" );
-        m_provider.putAttachmentData( att2, new FileInputStream(in) );
+        m_provider.putAttachmentData( att2, Files.newInputStream( in.toPath() ) );
 
         final List< Attachment > res = m_provider.listAllChanged( new Date(0L) );
 
@@ -220,14 +224,14 @@ public class BasicAttachmentProviderTest {
         final File attDir = new File( sDir, NAME1+"-att" );
 
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1.txt" );
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
         makeExtraFile( attDir, "ping.pong" );
 
         awaitility().await( "testListAllExtrafileInAttachmentDir" ).until( attachmentIsSaved( att ) );
 
         final Attachment att2 = Wiki.contents().attachment( m_engine, NAME2, "test2.txt" );
 
-        m_provider.putAttachmentData( att2, new FileInputStream(in) );
+        m_provider.putAttachmentData( att2, Files.newInputStream( in.toPath() ) );
 
         final List< Attachment > res = m_provider.listAllChanged( new Date(0L) );
 
@@ -249,7 +253,7 @@ public class BasicAttachmentProviderTest {
         final File sDir = new File(m_engine.getWikiProperties().getProperty( BasicAttachmentProvider.PROP_STORAGEDIR ));
         final File attDir = new File( sDir, NAME1+"-att" );
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1.txt" );
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
 
         // This is our extraneous directory.
         final File extrafile = new File( attDir, "ping.pong" );
@@ -259,7 +263,7 @@ public class BasicAttachmentProviderTest {
 
         final Attachment att2 = Wiki.contents().attachment( m_engine, NAME2, "test2.txt" );
 
-        m_provider.putAttachmentData( att2, new FileInputStream(in) );
+        m_provider.putAttachmentData( att2, Files.newInputStream( in.toPath() ) );
 
         final List< Attachment > res = m_provider.listAllChanged( new Date(0L) );
 
@@ -276,12 +280,12 @@ public class BasicAttachmentProviderTest {
     public void testListAllNoExtension() throws Exception {
         final File in = makeAttachmentFile();
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1." );
-        m_provider.putAttachmentData( att, new FileInputStream(in) );
+        m_provider.putAttachmentData( att, Files.newInputStream( in.toPath() ) );
 
         awaitility().await( "testListAllNoExtension" ).until( attachmentIsSaved( att ) );
 
         final Attachment att2 = Wiki.contents().attachment( m_engine, NAME2, "test2." );
-        m_provider.putAttachmentData( att2, new FileInputStream(in) );
+        m_provider.putAttachmentData( att2, Files.newInputStream( in.toPath() ) );
 
         final List< Attachment > res = m_provider.listAllChanged( new Date( 0L ) );
 
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 f5d367c85..227539658 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
@@ -37,10 +37,11 @@ import java.util.Properties;
 
 class CachingProviderTest {
 
+    TestEngine engine;
+
     @AfterEach
     void tearDown() {
-        TestEngine.emptyWikiDir();
-        TestEngine.emptyWorkDir();
+        engine.stop();
     }
 
     /**
@@ -52,7 +53,7 @@ class CachingProviderTest {
         props.setProperty( CachingManager.PROP_CACHE_ENABLE, "true" );
         props.setProperty( "jspwiki.pageProvider", "org.apache.wiki.providers.CounterProvider" );
 
-        final TestEngine engine = TestEngine.build( props );
+        engine = TestEngine.build( props );
         final CounterProvider p = ( CounterProvider )( ( CachingProvider )engine.getManager( PageManager.class ).getProvider() ).getRealProvider();
 
         Assertions.assertEquals( 1, p.m_initCalls, "init" );
@@ -62,13 +63,11 @@ class CachingProviderTest {
 
         engine.getManager( PageManager.class ).getPage( "Foo" );
         Assertions.assertEquals( 0, p.m_pageExistsCalls, "pageExists2" );
-
-        engine.shutdown();
     }
 
     @Test
     void testSneakyAdd() throws Exception {
-        final TestEngine engine = TestEngine.build();
+        engine = TestEngine.build();
         final String dir = engine.getWikiProperties().getProperty( FileSystemProvider.PROP_PAGEDIR );
         final File f = new File( dir, "Testi.txt" );
         final String content = "[fuufaa]";
@@ -83,7 +82,6 @@ class CachingProviderTest {
 
         final String text = engine.getManager( PageManager.class ).getText( "Testi");
         Assertions.assertEquals( "[fuufaa]", text, "text" );
-        engine.shutdown();
     }
 
     @Test
@@ -92,12 +90,11 @@ class CachingProviderTest {
         props.setProperty( CachingManager.PROP_CACHE_ENABLE, "true" );
         props.setProperty( "jspwiki.cache.config-file", "ehcache-jspwiki-small.xml" );
 
-        final TestEngine engine = TestEngine.build( props );
+        engine = TestEngine.build( props );
         engine.saveText( "page1", "page that should be cached" );
         engine.saveText( "page2", "page that should not be cached" );
 
-        Assertions.assertEquals( 2, engine.getManager( PageManager.class ).getAllPages().size() );
-        engine.shutdown();
+        Assertions.assertEquals( 2, engine.getManager( PageManager.class ).getAllPages().size(), engine.getManager( PageManager.class ).getAllPages().toString() );
     }
 
     @Test
@@ -107,10 +104,9 @@ class CachingProviderTest {
         props.setProperty( "jspwiki.pageProvider", "org.apache.wiki.providers.CounterProvider" );
         props.setProperty( "jspwiki.cache.config-file", "ehcache-jspwiki-small.xml" );
 
-        final TestEngine engine = TestEngine.build( props );
+        engine = TestEngine.build( props );
 
         Assertions.assertEquals( 4, engine.getManager( PageManager.class ).getAllPages().size() );
-        engine.shutdown();
     }
 
 }
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/providers/VersioningFileProviderTest.java b/jspwiki-main/src/test/java/org/apache/wiki/providers/VersioningFileProviderTest.java
index 65c38ddd6..509a599e9 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/providers/VersioningFileProviderTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/providers/VersioningFileProviderTest.java
@@ -62,14 +62,7 @@ public class VersioningFileProviderTest {
 
     @AfterEach
     public void tearDown() {
-        // Remove all/any files and subdirs left in test page directory
-        TestEngine.deleteAll( new File(files) );
-
-        // clear the cache at the end of every test case to avoid polluting another test case
         engine.stop();
-
-        // make sure that the reference manager cache is cleaned first
-        TestEngine.emptyWorkDir(null);
     }
 
     /*
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/references/ReferenceManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/references/ReferenceManagerTest.java
index f344b4302..c585b1434 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/references/ReferenceManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/references/ReferenceManagerTest.java
@@ -46,14 +46,7 @@ public class ReferenceManagerTest  {
 
     @AfterEach
     public void tearDown() {
-        // any wiki page that was created must be deleted!
-        TestEngine.emptyWikiDir();
-
-        // jspwiki always uses a singleton CacheManager, so clear the cache at the end of every test case to avoid polluting another test case
         engine.stop();
-
-        // make sure that the reference manager cache is cleaned
-        TestEngine.emptyWorkDir( null );
     }
 
     @Test
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/render/RenderingManagerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/render/RenderingManagerTest.java
index 9e3bed7e9..47d6ec7ff 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/render/RenderingManagerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/render/RenderingManagerTest.java
@@ -37,7 +37,6 @@ public class RenderingManagerTest {
 
     @AfterEach
     public void tearDown() throws Exception {
-        m_engine.getManager( PageManager.class ).deletePage( "TestPage" );
         m_engine.stop();
     }
 
@@ -100,9 +99,7 @@ public class RenderingManagerTest {
      * Tests the relative speed of the DOM cache with respect to page being parsed every single time.
      */
     @Test
-    public void testCache()
-        throws Exception
-    {
+    public void testCache() throws Exception {
         m_engine.saveText( "TestPage", TEST_TEXT );
 
         final StopWatch sw = new StopWatch();
@@ -110,17 +107,12 @@ public class RenderingManagerTest {
         // System.out.println("DOM cache speed test:");
         sw.start();
 
-        for( int i = 0; i < 300; i++ )
-        {
+        for( int i = 0; i < 300; i++ ) {
             final Page page = m_engine.getManager( PageManager.class ).getPage( "TestPage" );
             final String pagedata = m_engine.getManager( PageManager.class ).getPureText( page );
-
             final Context context = Wiki.context().create( m_engine, page );
-
             final MarkupParser p = m_manager.getParser( context, pagedata );
-
             final WikiDocument d = p.parse();
-
             final String html = m_manager.getHTML( context, d );
             Assertions.assertNotNull( html, "noncached got null response" );
         }
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 7eda07d63..ddc830b0d 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
@@ -55,14 +55,13 @@ public class SearchManagerTest {
         props.setProperty( "jspwiki.workDir", workDir + System.currentTimeMillis() );
         props.setProperty( "jspwiki.fileSystemProvider.pageDir", workRepo + System.currentTimeMillis() );
 
-        m_engine = new TestEngine( props );
+        m_engine = TestEngine.build( props );
         m_mgr = m_engine.getManager( SearchManager.class );
     }
 
     @AfterEach
     public void tearDown() {
         m_engine.stop();
-    	TestEngine.emptyWorkDir( props );
     }
 
     @Test
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/stress/MassiveRepositoryTest.java b/jspwiki-main/src/test/java/org/apache/wiki/stress/MassiveRepositoryTest.java
index 332b9dc70..dd246e2c2 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/stress/MassiveRepositoryTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/stress/MassiveRepositoryTest.java
@@ -22,14 +22,12 @@ import org.apache.wiki.TestEngine;
 import org.apache.wiki.api.exceptions.WikiException;
 import org.apache.wiki.api.providers.WikiProvider;
 import org.apache.wiki.pages.PageManager;
-import org.apache.wiki.providers.FileSystemProvider;
 import org.apache.wiki.render.RenderingManager;
 import org.apache.wiki.util.TextUtil;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-import java.io.File;
 import java.util.Properties;
 import java.util.Random;
 
@@ -40,9 +38,6 @@ public class MassiveRepositoryTest {
 
     @AfterEach
     public void tearDown() throws Exception {
-        final String files = props.getProperty( FileSystemProvider.PROP_PAGEDIR );
-        final File f = new File( files );
-        TestEngine.deleteAll( f );
         engine.stop();
     }
 
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/stress/StressTestVersioningProvider.java b/jspwiki-main/src/test/java/org/apache/wiki/stress/StressTestVersioningProvider.java
index c8be38823..b08d1c2ed 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/stress/StressTestVersioningProvider.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/stress/StressTestVersioningProvider.java
@@ -21,11 +21,9 @@ package org.apache.wiki.stress;
 import org.apache.wiki.TestEngine;
 import org.apache.wiki.api.core.Page;
 import org.apache.wiki.pages.PageManager;
-import org.apache.wiki.providers.FileSystemProvider;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Assertions;
 
-import java.io.File;
 import java.util.Collection;
 import java.util.Properties;
 
@@ -37,32 +35,19 @@ public class StressTestVersioningProvider {
     TestEngine engine = TestEngine.build( props );
 
     @AfterEach
-    public void tearDown()
-    {
-        final String files = props.getProperty( FileSystemProvider.PROP_PAGEDIR );
-
-        // Remove file
-        File f = new File( files, NAME1+FileSystemProvider.FILE_EXT );
-        f.delete();
-
-        f = new File( files, "OLD" );
-
-        TestEngine.deleteAll(f);
+    public void tearDown() {
+        engine.stop();
     }
 
-    public void testMillionChanges()
-        throws Exception
-    {
+    public void testMillionChanges() throws Exception {
         String text = "";
-        final String name = NAME1;
-        final int    maxver = 2000; // Save 2000 versions.
+        final int maxver = 2000; // Save 2000 versions.
         final Benchmark mark = new Benchmark();
 
         mark.start();
-        for( int i = 0; i < maxver; i++ )
-        {
+        for( int i = 0; i < maxver; i++ ) {
             text = text + ".";
-            engine.saveText( name, text );
+            engine.saveText( NAME1, text );
         }
 
         mark.stop();
@@ -73,27 +58,23 @@ public class StressTestVersioningProvider {
         Assertions.assertEquals( maxver, pageinfo.getVersion(), "wrong version" );
 
         // +2 comes from \r\n.
-        Assertions.assertEquals( maxver+2, engine.getManager( PageManager.class ).getText(NAME1).length(), "wrong text" );
+        Assertions.assertEquals( maxver+2, engine.getManager( PageManager.class ).getText( NAME1 ).length(), "wrong text" );
     }
 
-    private void runMassiveFileTest( final int maxpages)
-        throws Exception
-    {
+    private void runMassiveFileTest( final int maxpages) throws Exception {
         final String text = "Testing, 1, 2, 3: ";
-        final String name = NAME1;
         final Benchmark mark = new Benchmark();
 
         System.out.println("Building a massive repository of "+maxpages+" pages...");
 
         mark.start();
-        for( int i = 0; i < maxpages; i++ )
-        {
-            engine.saveText( name+i, text+i );
+        for( int i = 0; i < maxpages; i++ ) {
+            engine.saveText( NAME1 + i, text + i );
         }
         mark.stop();
 
-        System.out.println("Total time to save "+maxpages+" pages was "+mark.toString() );
-        System.out.println("Saved "+mark.toString(maxpages)+" pages/second");
+        System.out.println( "Total time to save " + maxpages + " pages was " + mark );
+        System.out.println( "Saved " + mark.toString( maxpages ) + " pages/second" );
 
         mark.reset();
 
@@ -101,7 +82,7 @@ public class StressTestVersioningProvider {
         final Collection< Page > pages = engine.getManager( PageManager.class ).getAllPages();
         mark.stop();
 
-        System.out.println("Got a list of all pages in "+mark);
+        System.out.println( "Got a list of all pages in " + mark );
 
         mark.reset();
         mark.start();
@@ -112,29 +93,20 @@ public class StressTestVersioningProvider {
         }
         mark.stop();
 
-        System.out.println("Read through all of the pages in "+mark);
-        System.out.println("which is "+mark.toString(maxpages)+" pages/second");
+        System.out.println( "Read through all of the pages in " + mark );
+        System.out.println( "which is " + mark.toString( maxpages ) + " pages/second" );
     }
 
-    public void testMillionFiles1() throws Exception
-    {
-        runMassiveFileTest(100);
+    public void testMillionFiles1() throws Exception {
+        runMassiveFileTest( 100 );
     }
 
-    public void testMillionFiles2() throws Exception
-    {
-        runMassiveFileTest(1000);
+    public void testMillionFiles2() throws Exception {
+        runMassiveFileTest( 1000 );
     }
 
-    public void testMillionFiles3() throws Exception
-    {
-        runMassiveFileTest(10000);
-    }
-    /*
-    public void testMillionFiles4()throws Exception
-    {
-        runMassiveFileTest(100000);
+    public void testMillionFiles3() throws Exception {
+        runMassiveFileTest( 10000 );
     }
-    */
 
 }
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/web/TestContainer.java b/jspwiki-main/src/test/java/org/apache/wiki/web/TestContainer.java
index 3cdc14842..41a95bb4e 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/web/TestContainer.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/web/TestContainer.java
@@ -53,8 +53,7 @@ import java.util.Map;
  * hard-coded port {@link #HTTP_PORT}. The server can be shut down by sending a
  * request containing the hard-coded string {@link #SHUTDOWN_CMD}.
  */
-public class TestContainer
-{
+public class TestContainer {
     private final Server server;
 
     /**
@@ -85,12 +84,10 @@ public class TestContainer
      * @param args the command-line arguments
      * @throws Exception - you know, just in case.
      */
-    public static void main(final String[] args ) throws Exception
-    {
+    public static void main(final String[] args ) throws Exception {
         // Extract key-value pairs that represent test contexts and directories
         final Map<String, String> apps = extractApps( args );
-        if( apps.size() == 0 )
-        {
+        if( apps.size() == 0 ) {
             throw new IllegalArgumentException( "No apps supplied!" );
         }
 
@@ -98,8 +95,7 @@ public class TestContainer
 
         // Create a new server and load up the webapps
         final TestContainer container = new TestContainer();
-        for( final Map.Entry<String, String> app : apps.entrySet() )
-        {
+        for( final Map.Entry<String, String> app : apps.entrySet() ) {
             final String context = app.getKey();
             final String path = app.getValue();
             log.error( "Adding context " + context + " at path " + path );
@@ -108,7 +104,7 @@ public class TestContainer
 
         handlerCollection.addHandler( new DefaultHandler() );
 
-        // setup the hsqldb database engine
+        // set up the hsqldb database engine
         m_hu.setUp();
 
         // Create the connection pool
@@ -129,8 +125,7 @@ public class TestContainer
         userDB.bindToENC("jdbc/GroupDatabase");
         
         // Start the server
-        try
-        {
+        try {
             log.error( "Starting up test container." );
             container.server.setHandler( handlerCollection );
             final Handler[] currentHandlers = container.server.getHandlers();
@@ -147,9 +142,7 @@ public class TestContainer
                 }
             }
             container.start();
-        }
-        catch( final Throwable t )
-        {
+        } catch( final Throwable t ) {
             // userDB.unbindENC();
             // groupDB.unbindENC();
             t.printStackTrace();
@@ -161,32 +154,27 @@ public class TestContainer
     private static Map<String, String> extractApps(final String[] args )
     {
         final Map<String, String> apps = new HashMap<String, String>();
-        for( int i = 0; i < args.length; i++ )
-        {
-            final String[] pair = args[i].split( "=" );
+        for( final String arg : args ) {
+            final String[] pair = arg.split( "=" );
 
             // Right length?
-            if( pair.length != 2 )
-            {
-                throw new IllegalArgumentException( "Malformed argument '" + args[i] + "'; expected 'context=path' pattern." );
+            if( pair.length != 2 ) {
+                throw new IllegalArgumentException( "Malformed argument '" + arg + "'; expected 'context=path' pattern." );
             }
 
             // Extract and sanitize first arg
-            String context = pair[0].trim();
-            if( !context.startsWith( "/" ) )
-            {
+            String context = pair[ 0 ].trim();
+            if( !context.startsWith( "/" ) ) {
                 context = "/" + context;
             }
 
             // Extract and verify the path
-            final String path = pair[1].trim();
+            final String path = pair[ 1 ].trim();
             final File file = new File( path );
-            if( !file.exists() )
-            {
+            if( !file.exists() ) {
                 throw new IllegalArgumentException( "Path " + path + " does not exist." );
             }
-            if( !file.isDirectory() )
-            {
+            if( !file.isDirectory() ) {
                 throw new IllegalArgumentException( "Path " + path + " cannot be a file; it must be a directory." );
             }
 
@@ -197,18 +185,15 @@ public class TestContainer
     }
 
     /**
-     * Prepares a Jetty server with its HTTP and shutdown handlers. Callers must
-     * start the server by calling {@link #start()}.
+     * Prepares a Jetty server with its HTTP and shutdown handlers. Callers must start the server by calling {@link #start()}.
      * 
      * @throws Exception you know, just in case
      */
-    public TestContainer() throws Exception
-    {
+    public TestContainer() throws Exception {
         // Initialize JNDI for the server, using the Jetty JNDI packages if not set yet
         // Normally this is set at JVM startup by property -Djava.naming.factory.initial=classname
         String contextFactoryClass = System.getProperty( INITIAL_CONTEXT_FACTORY );
-        if ( contextFactoryClass == null )
-        {
+        if ( contextFactoryClass == null ) {
             System.setProperty( INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY_JETTY );
 //            ContextFactory.setNameParser( new InitialContextFactory.DefaultParser() );
             log.error( "No JNDI context factory found; using org.eclipse.jndi.InitialContextFactory." );
@@ -218,12 +203,9 @@ public class TestContainer
         
         // Bind the "java:comp/env" namespace if not bound already
         initCtx = new InitialContext();
-        try 
-        {
+        try {
             initCtx.lookup( JNDI_ENV_ROOT );
-        }
-        catch ( final NameNotFoundException e )
-        {
+        } catch( final NameNotFoundException e ) {
             initCtx.bind( JNDI_ENV_ROOT, new NamingContext(new Hashtable<String, Object>(), JNDI_ENV_ROOT, null, new InitialContextFactory.DefaultParser()) );
             log.error( "No JNDI " + JNDI_ENV_ROOT + " namespace found; creating it," );
         }
@@ -255,7 +237,6 @@ public class TestContainer
      * 
      * @param context the name of the web m_context; must start with "/"
      * @param path the file path for the WAR file, or expanded WAR directory
-     * @throws IOException
      */
     public void addWebApp( final String context, final String path ) {
         // Set the default users and roles for the realm (note that realm name *must* match web.xml <realm-name>
@@ -279,8 +260,7 @@ public class TestContainer
     /**
      * Starts the Jetty server
      */
-    public void start() throws Exception
-    {
+    public void start() throws Exception {
         System.setProperty( "org.eclipse.http.HttpRequest.maxFormContentSize", "0" );
         server.start();
         log.error("jetty server started");
@@ -289,34 +269,22 @@ public class TestContainer
     /**
      * Stops the Jetty server
      */
-    public void stop()
-    {
-        try
-        {
+    public void stop() {
+        try {
             server.stop();
             log.error("jetty server stopped");
-        }
-        catch( final Exception ex )
-        {
+        } catch( final Exception ex ) {
             throw new RuntimeException( ex );
         }
     }
     
-    
-    
     /**
      * Handler that shuts down the Jetty server if a request is received containing the shutdown string {@link TestContainer#SHUTDOWN_CMD} .
      */
+    public static final class ShutdownHandler extends AbstractHandler {
 
-    public static final class ShutdownHandler extends AbstractHandler
-    {
-
-        public void handle(final String target, final Request baseRequest, final HttpServletRequest request, final HttpServletResponse response )
-                                                                                                                          throws IOException,
-                                                                                                                              ServletException
-        {
-            if( request.getRequestURI().indexOf( SHUTDOWN_CMD ) != -1 )
-            {
+        public void handle(final String target, final Request baseRequest, final HttpServletRequest request, final HttpServletResponse response ) throws IOException, ServletException {
+            if( request.getRequestURI().contains( SHUTDOWN_CMD ) ) {
                 log.error( "stop cmd received, shutting down server" );
                 System.exit( 0 );
             } else {
diff --git a/jspwiki-main/src/test/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java b/jspwiki-main/src/test/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java
index 5f09e617c..08b56a57a 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/xmlrpc/RPCHandlerTest.java
@@ -53,10 +53,7 @@ public class RPCHandlerTest {
 
     @AfterEach
     public void tearDown() {
-        m_engine.deleteTestPage( NAME1 );
         m_engine.stop();
-        TestEngine.deleteAttachments( NAME1 );
-        TestEngine.emptyWorkDir();
     }
 
     @Test
@@ -73,12 +70,12 @@ public class RPCHandlerTest {
     public void testRecentChanges()
             throws Exception {
         Date time = getCalendarTime( Calendar.getInstance().getTime() );
-        final Vector previousChanges = m_handler.getRecentChanges( time );
+        final Vector< Hashtable< String, Object > > previousChanges = m_handler.getRecentChanges( time );
 
         m_engine.saveText( NAME1, "Foo" );
         final Page directInfo = m_engine.getManager( PageManager.class ).getPage( NAME1 );
         time = getCalendarTime( directInfo.getLastModified() );
-        final Vector recentChanges = m_handler.getRecentChanges( time );
+        final Vector< Hashtable< String, Object > > recentChanges = m_handler.getRecentChanges( time );
 
         Assertions.assertEquals( 1, recentChanges.size() - previousChanges.size(), "wrong number of changes" );
     }
@@ -87,7 +84,7 @@ public class RPCHandlerTest {
     public void testRecentChangesWithAttachments()
             throws Exception {
         Date time = getCalendarTime( Calendar.getInstance().getTime() );
-        final Vector previousChanges = m_handler.getRecentChanges( time );
+        final Vector< Hashtable< String, Object > > previousChanges = m_handler.getRecentChanges( time );
 
         m_engine.saveText( NAME1, "Foo" );
         final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "TestAtt.txt" );
@@ -95,7 +92,7 @@ public class RPCHandlerTest {
         m_engine.getManager( AttachmentManager.class ).storeAttachment( att, m_engine.makeAttachmentFile() );
         final Page directInfo = m_engine.getManager( PageManager.class ).getPage( NAME1 );
         time = getCalendarTime( directInfo.getLastModified() );
-        final Vector recentChanges = m_handler.getRecentChanges( time );
+        final Vector< Hashtable< String, Object > > recentChanges = m_handler.getRecentChanges( time );
 
         Assertions.assertEquals( 1, recentChanges.size() - previousChanges.size(), "wrong number of changes" );
     }
@@ -106,7 +103,7 @@ public class RPCHandlerTest {
         m_engine.saveText( NAME1, "Foobar.[{ALLOW view Anonymous}]" );
         final Page directInfo = m_engine.getManager( PageManager.class ).getPage( NAME1 );
 
-        final Hashtable ht = m_handler.getPageInfo( NAME1 );
+        final Hashtable< String, Object > ht = m_handler.getPageInfo( NAME1 );
         Assertions.assertEquals( ht.get( "name" ), NAME1, "name" );
 
         final Date d = ( Date ) ht.get( "lastModified" );
@@ -138,11 +135,11 @@ public class RPCHandlerTest {
 
         m_engine.saveText( pageName, text );
 
-        final Vector links = m_handler.listLinks( pageName );
+        final Vector< Hashtable< String, String > > links = m_handler.listLinks( pageName );
 
         Assertions.assertEquals( 1, links.size(), "link count" );
 
-        final Hashtable linkinfo = ( Hashtable ) links.elementAt( 0 );
+        final Hashtable< String, String > linkinfo = links.elementAt( 0 );
 
         Assertions.assertEquals( "Foobar", linkinfo.get( "page" ), "name" );
         Assertions.assertEquals( "local", linkinfo.get( "type" ), "type" );
@@ -164,17 +161,17 @@ public class RPCHandlerTest {
 
         // Test.
 
-        final Vector links = m_handler.listLinks( pageName );
+        final Vector< Hashtable< String, String > > links = m_handler.listLinks( pageName );
 
         Assertions.assertEquals( 2, links.size(), "link count" );
 
-        Hashtable linkinfo = ( Hashtable ) links.elementAt( 0 );
+        Hashtable< String, String > linkinfo = links.elementAt( 0 );
 
         Assertions.assertEquals( "Foobar", linkinfo.get( "page" ), "edit name" );
         Assertions.assertEquals( "local", linkinfo.get( "type" ), "edit type" );
         Assertions.assertEquals( "/test/Edit.jsp?page=Foobar", linkinfo.get( "href" ), "edit href" );
 
-        linkinfo = ( Hashtable ) links.elementAt( 1 );
+        linkinfo = links.elementAt( 1 );
 
         Assertions.assertEquals( NAME1 + "/TestAtt.txt", linkinfo.get( "page" ), "att name" );
         Assertions.assertEquals( "local", linkinfo.get( "type" ), "att type" );
diff --git a/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java b/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
index c0aa8f28d..cf3d8f6e5 100644
--- a/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
+++ b/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
@@ -311,11 +311,6 @@ public class MarkdownRendererTest {
 
     @AfterEach
     public void tearDown() {
-        for( final String name : created ) {
-            testEngine.deleteTestPage( name );
-            TestEngine.deleteAttachments( name );
-        }
-
         created.clear();
         testEngine.stop();
     }


[jspwiki] 06/07: update with latest updated versions

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 a407a7116cbf92b1dfcdb1ff1b67cfa417ad059d
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:54:17 2022 +0200

    update with latest updated versions
---
 LICENSE | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/LICENSE b/LICENSE
index bf62ef099..1a04fef83 100644
--- a/LICENSE
+++ b/LICENSE
@@ -280,15 +280,15 @@ xpp3-1.1.3.4-RC3                            ./jspwiki-war/src/main/config/doc/LI
 
 TEST LIBRARY                                LICENSE FILE
 =============================================================================================================
-awaitility-4.1.1.jar                        LICENSE
+awaitility-4.2.0.jar                        LICENSE
 commons-el-1.0.jar                          LICENSE
 custom_rhino-0.4.3.jar                      ./jspwiki-war/src/main/config/doc/LICENSE.mpl
 hsqldb-2.6.1.jar                            ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
 sqltool-2.6.1.jar                           ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
-jetty-all-9.4.45.v20220203.jar              LICENSE
+jetty-all-9.4.46.v20220331.jar              LICENSE
 junit-5.8.2                                 ./jspwiki-war/src/main/config/doc/LICENSE.cpl
-mockito-core-4.4.0.jar                      ./jspwiki-war/src/main/config/doc/LICENSE.mit
-selenide-6.3.5.jar                          ./jspwiki-war/src/main/config/doc/LICENSE.mit
+mockito-core-4.5.1.jar                      ./jspwiki-war/src/main/config/doc/LICENSE.mit
+selenide-6.4.0.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
 


[jspwiki] 01/07: TestEngine#shutdown() now cleans cache, wiki pages dir and their associated attachments, if any

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 31a0633216743f19cb275ebdf339b372cffb1de0
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:47:24 2022 +0200

    TestEngine#shutdown() now cleans cache, wiki pages dir and their associated attachments, if any
    
    * TestEngine#emptyWikiDir( Properties ) deletes both page and attachment directories
---
 .../src/test/java/org/apache/wiki/TestEngine.java      | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/jspwiki-main/src/test/java/org/apache/wiki/TestEngine.java b/jspwiki-main/src/test/java/org/apache/wiki/TestEngine.java
index 1ccf1ef0b..95dbe234a 100644
--- a/jspwiki-main/src/test/java/org/apache/wiki/TestEngine.java
+++ b/jspwiki-main/src/test/java/org/apache/wiki/TestEngine.java
@@ -230,6 +230,14 @@ public class TestEngine extends WikiEngine {
         return request;
     }
 
+    /** {@inheritDoc} */
+    @Override
+    public void shutdown() {
+        super.shutdown();
+        TestEngine.emptyWikiDir( getWikiProperties() );
+        TestEngine.emptyWorkDir( getWikiProperties() );
+    }
+
     public static void emptyWorkDir() {
         emptyWorkDir( null );
     }
@@ -258,9 +266,13 @@ public class TestEngine extends WikiEngine {
         if( properties == null ) {
             properties = getTestProperties();
         }
-        final String wikidir = properties.getProperty( AbstractFileProvider.PROP_PAGEDIR );
-        if ( wikidir != null ) {
-            final File f = new File( wikidir );
+        emptyDir( properties.getProperty( AbstractFileProvider.PROP_PAGEDIR ) );
+        emptyDir( properties.getProperty( AttachmentProvider.PROP_STORAGEDIR ) );
+    }
+
+    static void emptyDir( final String dir ) {
+        if ( dir != null ) {
+            final File f = new File( dir );
             if( f.exists() && f.isDirectory() ) {
                 deleteAll( f );
             }


[jspwiki] 04/07: Update doclet version for JDK >= 9

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 68faee53510394a7895e279a00f8a570d395652d
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:51:09 2022 +0200

    Update doclet version for JDK >= 9
---
 mvn_cheat-sheet.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mvn_cheat-sheet.md b/mvn_cheat-sheet.md
index a5a4c7dc5..a94e25f78 100644
--- a/mvn_cheat-sheet.md
+++ b/mvn_cheat-sheet.md
@@ -53,5 +53,5 @@ under the License.
 | mvn apache-rat:check                                    | creates an Apache RAT report. See: http://creadur.apache.org/rat/apache-rat-plugin/plugin-info.html |
 | mvn cobertura:cobertura                                 | generates a cobertura maven report. See: http://mojo.codehaus.org/cobertura-maven-plugin/usage.html |
 | mvn javadoc:javadoc                                     | creates javadocs adding some UML class/package level diagrams (requires JDK<= 8)                    |
-| mvn javadoc:javadoc -Djdk.javadoc.doclet.version=2.0.15 | same as above, but with JDK >= 9                                                                    |
+| mvn javadoc:javadoc -Djdk.javadoc.doclet.version=2.0.16 | same as above, but with JDK >= 9                                                                    |
 | mvn sonar:sonar                                         | generates a Sonar report. Expects a Sonar server running at http://localhost:9000/                  |


[jspwiki] 02/07: Explicit generic parameters on getPageInfo and getPageInfoVersion

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 7535118e830fbfd674ca707eddca8976b4c0b87b
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:49:09 2022 +0200

    Explicit generic parameters on getPageInfo and getPageInfoVersion
---
 jspwiki-main/src/main/java/org/apache/wiki/xmlrpc/RPCHandler.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jspwiki-main/src/main/java/org/apache/wiki/xmlrpc/RPCHandler.java b/jspwiki-main/src/main/java/org/apache/wiki/xmlrpc/RPCHandler.java
index e0f942e8a..4be6ff807 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/xmlrpc/RPCHandler.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/xmlrpc/RPCHandler.java
@@ -174,12 +174,12 @@ public class RPCHandler extends AbstractRPCHandler {
         return pagename;
     }
 
-    public Hashtable getPageInfo( String pagename ) throws XmlRpcException {
+    public Hashtable< String, Object > getPageInfo( String pagename ) throws XmlRpcException {
         pagename = parsePageCheckCondition( pagename );
         return encodeWikiPage( m_engine.getManager( PageManager.class ).getPage(pagename) );
     }
 
-    public Hashtable getPageInfoVersion( String pagename, final int version ) throws XmlRpcException {
+    public Hashtable< String, Object > getPageInfoVersion( String pagename, final int version ) throws XmlRpcException {
         pagename = parsePageCheckCondition( pagename );
 
         return encodeWikiPage( m_engine.getManager( PageManager.class ).getPage( pagename, version ) );


[jspwiki] 07/07: 2.11.3-git-08

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 17b28348b4293e248acf4296a9d2590938e3b812
Author: Juan Pablo Santos Rodríguez <ju...@gmail.com>
AuthorDate: Sun May 1 14:54:53 2022 +0200

    2.11.3-git-08
---
 ChangeLog.md                                               | 12 ++++++++++++
 jspwiki-api/src/main/java/org/apache/wiki/api/Release.java |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog.md b/ChangeLog.md
index f92a4fc31..f393d65aa 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -17,6 +17,18 @@ specific language governing permissions and limitations
 under the License.
 -->
 
+**2022-05-01  Juan Pablo Santos (juanpablo AT apache DOT org)**
+
+* _2.11.3-git-08_
+
+* `TestEngine#shutdown` now cleans cache, wiki pages dir and their associated attachments, if any. This allows cleaning up a handful of tests
+    * `TestEngine#emptyWikiDir` deletes both page and attachment directories
+
+* Dependency updates
+    * Jetty to 9.4.46.v20220331 - closes [#181](https://github.com/apache/jspwiki/pull/181), thanks to dependabot
+    * Mockito to 4.5.1 - closes [#185](https://github.com/apache/jspwiki/pull/185), thanks to dependabot
+    * Maven project info reports plugin to 3.3.0 - closes [#186](https://github.com/apache/jspwiki/pull/186), thanks to dependabot
+
 **2022-04-24  Juan Pablo Santos (juanpablo AT apache DOT org)**
 
 * _2.11.3-git-07_
diff --git a/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java b/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
index 088ad9181..3fcfb7f55 100644
--- a/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
+++ b/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
@@ -69,7 +69,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "07";
+    public static final String     BUILD         = "08";
 
     /**
      *  This is the generic version string you should use when printing out the version.  It is of