You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Glen Mazza <gl...@gmail.com> on 2012/10/27 18:32:59 UTC
JSPWiki test failing
Hi, trying to build JSPWiki trunk (I'm using Oracle JDK 7 on Ubuntu
Linux) is bringing up JUnit test failures with PageViewPluginTest's
testShowCountsBasic(). To test this repeatedly, I first modify the Ant
build.xml to run this test alone:
Index: build.xml
===================================================================
--- build.xml (revision 1402816)
+++ build.xml (working copy)
@@ -844,7 +844,7 @@
<formatter type="xml" usefile="yes" />
<batchtest todir="${tests.reports}">
<fileset dir="${tests.src}">
- <include name="**/*Test.java" />
+ <include name="**/PageViewPluginTest.java" />
<exclude name="**/AllTest*java" />
<include name="**/StressTestSpeed.java"
if="tests.stress.enabled"/>
<exclude name="org/apache/wiki/web/*.*" />
It fails with these results:
<ul><li>Test Page 01 (8 views)
</li></ul><ul><li>Test Page 02 (12 views)
</li></ul><ul><li>Test Page 03 (2 views)
</li></ul><ul><li>Test Page 04 (2 views)
</li></ul><ul><li>Test Page Excluded (1 views)
</li></ul>
Namely, test page #1 should have only 2 views and test page #2 should
have three. I *thought* the problem was somehow the pages weren't being
deleted and the increased viewcounts were because the numbers were being
increased from other tests within this class. But that may not be the
only problem, because when I switched away from the common Page 1 and
Page 2 and went with brand-new pages that weren't being used in the
other test cases, the same problem occurred 50% of the time
(pass-fail-pass-fail-pass-fail, etc. correctly passing with 2/3 views
but then failing with 3/4 views.)
Can anyone replicate this?
Thanks,
Glen
Re: How to build the website locally...
Posted by Glen Mazza <gl...@gmail.com>.
Never mind, I figured it all out (last comment here:
https://issues.apache.org/jira/browse/INFRA-5378
<https://issues.apache.org/jira/browse/INFRA-5378?focusedCommentId=13485727&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13485727>).
Glen
On 10/28/2012 06:17 PM, Glen Mazza wrote:
> Hi all, I'm having a terrible time trying to build the JSPWiki website
> locally, following these instructions:
> http://incubator.apache.org/jspwiki/development/edit_website.html (A)
> and here (what it refers to):
> http://www.apache.org/dev/cmsref.html#local-build (B)
>
> First of all, in (A) above, where it says I should run:
> buildsite/build_site.pl --source-base jspwiki-site --target-base
> jspwiki-website
>
> What is the "buildsite" folder? I believe you're referring to the
> "build" folder here:
> https://svn.apache.org/repos/infra/websites/cms/build/ once we check
> it out, right?
>
> Also my last failure is explained here:
> https://issues.apache.org/jira/browse/INFRA-5378?focusedCommentId=13485727&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13485727
>
> Can someone explain to me what I'm doing wrong?
>
> Thanks,
> Glen
>
>
How to build the website locally...
Posted by Glen Mazza <gl...@gmail.com>.
Hi all, I'm having a terrible time trying to build the JSPWiki website
locally, following these instructions:
http://incubator.apache.org/jspwiki/development/edit_website.html (A)
and here (what it refers to):
http://www.apache.org/dev/cmsref.html#local-build (B)
First of all, in (A) above, where it says I should run:
buildsite/build_site.pl --source-base jspwiki-site --target-base
jspwiki-website
What is the "buildsite" folder? I believe you're referring to the
"build" folder here:
https://svn.apache.org/repos/infra/websites/cms/build/ once we check it
out, right?
Also my last failure is explained here:
https://issues.apache.org/jira/browse/INFRA-5378?focusedCommentId=13485727&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13485727
Can someone explain to me what I'm doing wrong?
Thanks,
Glen
Re: JSPWiki test failing
Posted by Glen Mazza <gl...@gmail.com>.
Works for me, thx.
Glen
On 10/28/2012 06:20 PM, Florian Holeczek wrote:
> Hi Glen,
>
> have a look at JSPWIKI-750, guess it's a good enough quick fix. Does it work for you, too?
>
> Regards
> Florian
Re: JSPWiki test failing
Posted by Florian Holeczek <fl...@holeczek.de>.
Hi Glen,
have a look at JSPWIKI-750, guess it's a good enough quick fix. Does it work for you, too?
Regards
Florian
Re: JSPWiki test failing
Posted by Glen Mazza <gl...@gmail.com>.
Hi Florian, I'm using JUnit 3.8.2, Oracle JDK 1.7.0_05, Ubuntu 12.04-64
bit against the current JSPWiki trunk.
I submitted a patch here:
https://issues.apache.org/jira/browse/JSPWIKI-665, but it ends up
breaking another test case within the same class (as described in that
JIRA.)
The main problem is that the PageViewPlugin doesn't appear to erase its
count for a page when a Wiki page is deleted, hence it reuses the same
page counts it has in memory when that page is recreated in another test
case. Hence tests will fail if JUnit runs them in a different order on
JDK 7 than it does on JDK 6, because the page counts you're testing for
will be different. I couldn't see an immediate solution to it, somehow
the WikiEngine needs to send notifications to the PVP whenever a page is
deleted so the PVP can remove that page and its associated count from
its in-memory database. Further, saves to the text may require a
similar notification, because if you have the [PageViewPlugin] defined
on the first save, the page will go to the PVP's database, but if you
subsequently remove that tag and re-save the page you'll want to remove
that entry from the PVP database. An alternative solution that could
work for all plugins might be to have a public WikiEngine
broadcastPageList() method that can be externally called (say, within
the tearDown() method of the JUnit test class). It would provide a list
of all its current pages in memory to any plugin listening for it, and
each plugin can then go through its database, removing
no-longer-existing pages.
Regards,
Glen
On 10/28/2012 03:18 AM, Florian Holeczek wrote:
> Hi Glen,
>
> the most interesting part is why there is a difference to Oracle/Sun JDK 6, which I've always been using without any problems so far (under Linux x86-64).
> I'll try to reproduce it later this day.
> Which exact version are you using? I remember the first versions to have a bug, something like a too aggressive bytecode compiler having modified the semantics of the code... AFAIR the Lucene project detected this flaw.
>
> Regards
> Florian
Re: JSPWiki test failing
Posted by Florian Holeczek <fl...@holeczek.de>.
Hi Glen,
the most interesting part is why there is a difference to Oracle/Sun JDK 6, which I've always been using without any problems so far (under Linux x86-64).
I'll try to reproduce it later this day.
Which exact version are you using? I remember the first versions to have a bug, something like a too aggressive bytecode compiler having modified the semantics of the code... AFAIR the Lucene project detected this flaw.
Regards
Florian
Re: JSPWiki test failing
Posted by Glen Mazza <gl...@gmail.com>.
Never mind on the 2nd half of what I was saying below, switching away to
brand new pages not being used in the other tests works fine (coding
error on my part.) The first part of the problem still holds, I'll
submit a patch...
Glen
On 10/27/2012 12:32 PM, Glen Mazza wrote:
> Hi, trying to build JSPWiki trunk (I'm using Oracle JDK 7 on Ubuntu
> Linux) is bringing up JUnit test failures with PageViewPluginTest's
> testShowCountsBasic(). To test this repeatedly, I first modify the
> Ant build.xml to run this test alone:
>
> Index: build.xml
> ===================================================================
> --- build.xml (revision 1402816)
> +++ build.xml (working copy)
> @@ -844,7 +844,7 @@
> <formatter type="xml" usefile="yes" />
> <batchtest todir="${tests.reports}">
> <fileset dir="${tests.src}">
> - <include name="**/*Test.java" />
> + <include name="**/PageViewPluginTest.java" />
> <exclude name="**/AllTest*java" />
> <include name="**/StressTestSpeed.java"
> if="tests.stress.enabled"/>
> <exclude name="org/apache/wiki/web/*.*" />
>
>
> It fails with these results:
>
> <ul><li>Test Page 01 (8 views)
> </li></ul><ul><li>Test Page 02 (12 views)
> </li></ul><ul><li>Test Page 03 (2 views)
> </li></ul><ul><li>Test Page 04 (2 views)
> </li></ul><ul><li>Test Page Excluded (1 views)
> </li></ul>
>
> Namely, test page #1 should have only 2 views and test page #2 should
> have three. I *thought* the problem was somehow the pages weren't
> being deleted and the increased viewcounts were because the numbers
> were being increased from other tests within this class. But that may
> not be the only problem, because when I switched away from the common
> Page 1 and Page 2 and went with brand-new pages that weren't being
> used in the other test cases, the same problem occurred 50% of the
> time (pass-fail-pass-fail-pass-fail, etc. correctly passing with 2/3
> views but then failing with 3/4 views.)
>
> Can anyone replicate this?
>
> Thanks,
> Glen
>