Janne --

I solved the problem. How I solved it probably relates to Priha, and
it's worth explaining...

My first attempt at setting up MemoryProvider wasn't successful, so I
went back to the trial-and-error method with the standard setup until
I isolated the problem. Here is how to reproduce the issue:

- Tweak the Ant 'tests' target so that only ProviderManagerTest.java
and RecentChangesPluginTest.java run, and in that order
- Run 'ant clean tests'
- Watch as ProviderManagerTest passes, and RecentChangesPluginTest fails

The error message for RecentChangesPluginTest is thrown as part of a
call that goes through ContentManager.getAllPages(). Here is what it
says:

javax.jcr.PathNotFoundException: The property metadata file was not
found: /tmp/priha/fileprovider/workspaces/jspwiki/pages/Main/TestPage.info

RecentChangesPluginTest does not create or use TestPage! But if I look
in the source of PluginManager, I see that its setUp() method *does*
create TestPage. I **also** see that tearDown() deletes "Testpage"
(notice the wrong capitalization). When I change Testpage to TestPage
in PluginManagerTest.tearDown(), RecentChangesPluginTest all of a
sudden works fine.

Now, that's kind of interesting. But what is *really* interesting is
that RecentChangesPluginTest calls TestEngine.emptyRepository() in its
tearDown() method. So the repository *should* be empty when the
getAllPages() call executes.

While I haven't tried to actually slap a debugger on the sequence down
through Priha, my guess is that the EhCache is somehow failing to
empty its cache.

Anyhow, I thought I'd pass that on in case it helps.

Andrew

On Thu, Oct 15, 2009 at 3:32 PM, Janne Jalkanen
<[email protected]> wrote:
>
> On Oct 15, 2009, at 21:01 , Andrew Jaquith wrote:
>
>> So, can I go back to using Node.isNew()?
>
> As of ten seconds ago :-)
>
> (0.5.4 fixes this issue and adds an unit test to catch it.)
>
>> Also: I have 8 unit tests that fail when run from the command line as
>> part of the giant 1000+ test batch. But they run fine when run
>> individually form the command line or inside Eclipse. I didn't see
>> these prior to the latest Priha checkin.
>>
>> Any ideas? I'll try to isolate this, but it's proving to be extremely
>> difficult so far.
>
> My guess is that there's something which is not cleaned away properly.  You
> could try to isolate it by switching to MemoryProvider and seeing if the
> same error is still occurring.  If not (or you get a new exception) I can
> have a better guess.
>
> /Janne
>

Reply via email to