Author: ajaquith
Date: Tue Aug 12 23:24:38 2008
New Revision: 685459
URL: http://svn.apache.org/viewvc?rev=685459&view=rev
Log:
Fixed failing unit tests. MassiveRepositoryTest still failing due to heap
exhaustion. Other than that, at parity with 685311.
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/plugin/TableOfContentsTest.java
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/stress/MassiveRepositoryTest.java
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/plugin/TableOfContentsTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/plugin/TableOfContentsTest.java?rev=685459&r1=685458&r2=685459&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/plugin/TableOfContentsTest.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/com/ecyrd/jspwiki/plugin/TableOfContentsTest.java
Tue Aug 12 23:24:38 2008
@@ -56,7 +56,7 @@
// FIXME: The <p> should not be here.
assertEquals( "<p><div class=\"toc\">\n<div class=\"collapsebox\">\n"+
- "<h4>Table of Contents</h4>\n"+
+ "<h4 id=\"section-TOC\">Table of Contents</h4>\n"+
"<ul>\n"+
"<li class=\"toclevel-1\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-HeadingBar\">Heading bar</a></li>\n"+
"</ul>\n</div>\n</div>\n\n</p>"+
@@ -75,7 +75,7 @@
// FIXME: The <p> should not be here.
String expecting = "<p><div class=\"toc\">\n<div
class=\"collapsebox\">\n"+
- "<h4>Table of Contents</h4>\n"+
+ "<h4 id=\"section-TOC\">Table of Contents</h4>\n"+
"<ul>\n"+
"<li class=\"toclevel-1\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-HeadingBar\">3 Heading bar</a></li>\n"+
"<li class=\"toclevel-2\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-Subheading\">3.1 Subheading</a></li>\n"+
@@ -100,7 +100,7 @@
// FIXME: The <p> should not be here.
String expecting = "<p><div class=\"toc\">\n<div
class=\"collapsebox\">\n"+
- "<h4>Table of Contents</h4>\n"+
+ "<h4 id=\"section-TOC\">Table of Contents</h4>\n"+
"<ul>\n"+
"<li class=\"toclevel-1\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-HeadingBar\">3 Heading bar</a></li>\n"+
"<li class=\"toclevel-2\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-Subheading\">3.1 Subheading</a></li>\n"+
@@ -135,7 +135,7 @@
// FIXME: The <p> should not be here.
String expecting = "<p><div class=\"toc\">\n<div
class=\"collapsebox\">\n"+
- "<h4>Table of Contents</h4>\n"+
+ "<h4 id=\"section-TOC\">Table of Contents</h4>\n"+
"<ul>\n"+
"<li class=\"toclevel-2\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-Subheading0\">3.1
Subheading0</a></li>\n"+
"<li class=\"toclevel-1\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-HeadingBar\">4 Heading bar</a></li>\n"+
@@ -172,7 +172,7 @@
// FIXME: The <p> should not be here.
String expecting = "<p><div class=\"toc\">\n<div
class=\"collapsebox\">\n"+
- "<h4>Table of Contents</h4>\n"+
+ "<h4 id=\"section-TOC\">Table of Contents</h4>\n"+
"<ul>\n"+
"<li class=\"toclevel-1\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-HeadingBar\">FooBar-3 Heading
bar</a></li>\n"+
"<li class=\"toclevel-2\"><a class=\"wikipage\"
href=\"/Wiki.jsp?page=Test#section-Test-Subheading\">FooBar-3.1
Subheading</a></li>\n"+
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/stress/MassiveRepositoryTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/stress/MassiveRepositoryTest.java?rev=685459&r1=685458&r2=685459&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/stress/MassiveRepositoryTest.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/tests/stress/MassiveRepositoryTest.java
Tue Aug 12 23:24:38 2008
@@ -21,10 +21,18 @@
protected void setUp() throws Exception
{
super.setUp();
-
- props.load( TestEngine.findTestProperties("/jspwiki_vers.properties")
);
+ props.load( TestEngine.findTestProperties("/jspwiki_vers.properties")
);
props.setProperty( CachingProvider.PROP_CACHECAPACITY, "1000" );
+
+
+ String files = props.getProperty( FileSystemProvider.PROP_PAGEDIR );
+
+ // Remove file
+ File f = new File( files );
+
+ TestEngine.deleteAll(f);
+
engine = new TestEngine(props);
}
@@ -123,7 +131,9 @@
String page = getName( random.nextInt( numPages ) );
String content = engine.getHTML( page, WikiProvider.LATEST_VERSION
);
-
+
+ assertNotNull(content);
+
if( i % pm == 0 ) { System.out.print("."); System.out.flush(); }
}