[ 
https://issues.apache.org/jira/browse/SLING-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz resolved SLING-3087.
----------------------------------------

    Resolution: Fixed

"Fixed" in revision 1537938 by adding a client-side delay before running the 
current test, after deleting the previous test script and uploading the new one.

The key finding, that I didn't notice earlier, is that in this issue's 
description we see we're trying to run the resourceresolver-api.jsp test, but 
the server-side TestAllPaths class still sees the old 
installer-duplicate.test.txt, and not the new test, based on a repository 
query. So it tries to run an old test script that's not there anymore.

I've tried different things like using Session.refresh and verifying that items 
returned by a query actually exist, but that didn't help. There's been a good 
number of changes in Oak since the version 0.9 that we're using, so for now 
this workaround is good enough - if similar problems reappear elsewhere we can 
investigate more.

> Oak: ServerSideScriptsTest integration test fails semi-randomly with 404 
> errors
> -------------------------------------------------------------------------------
>
>                 Key: SLING-3087
>                 URL: https://issues.apache.org/jira/browse/SLING-3087
>             Project: Sling
>          Issue Type: Bug
>          Components: Oak
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>
> Running the test against my experimental Oak launchpad, with a single JSP 
> file under src/main/resources/scripts/sling-it (installer-duplicate.jsp or 
> resourceresolver-api.jsp) works all the time, but when running with these two 
> files present I get 404s about 50% of the time, details below.
> I haven't found the root cause yet. The 404 is set by the 
> ResourceNotFoundException catch in 
> SlingRequestProcessorImpl.processRequest(...)
> Failed tests:   runScripts[1 - 
> resourceresolver-api.jsp](org.apache.sling.launchpad.webapp.integrationtest.ServerSideScriptsTest):
>  
> Expected 0 failing tests but got 1 for 
> /Users/bert/workspace/apache/sling/launchpad/integration-tests/target/classes/scripts/sling-it/resourceresolver-api.jsp:
>  [verifyContent[0
> (org.apache.sling.junit.scriptable.TestAllPaths): Expecting HTTP status 200 
> for path
> /apps/testing/sling/scripted-tests/installer-duplicate.test.txt 
> expected:<200> but was:<404>]



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to