[ 
https://issues.apache.org/jira/browse/SLING-8155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16707656#comment-16707656
 ] 

Jason E Bailey commented on SLING-8155:
---------------------------------------

The issue with the info.sessionInfo.json has to do with the use of the 
JsonGenerator that I switched too.

When I initially implemented this, I closed the JsonGenerator when I finished. 
This created a problem where it closed the underlying response writer, which 
was then attempted to be closed later. So I changed the code to leave the 
JsonGenerator unclosed so that it wouldn't close the response writer.

This then has created an issue, where the JsonGenerator isn't flushing it's 
buffer to the response writer and that's why there's no response being written. 
Note that this is at the JsonGenerator implementation level. If I flush the 
underlying response writer, it doesn't help.

Still working on best solution for this.

 

> AuthRequestLoginTest and SlingSessionInfoTest fail with 
> org.mozilla.javascript.EvaluatorException: syntax error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-8155
>                 URL: https://issues.apache.org/jira/browse/SLING-8155
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>            Reporter: Robert Munteanu
>            Assignee: Radu Cotescu
>            Priority: Major
>
> Sometimes after Sling 11 we started getting IT failures does to JS errors 
> when evaluated on the client side, in the ITs:
> {noformat}[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time 
> elapsed: 0.007 s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest
> [ERROR] 
> testForcedLogin(org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest)
>   Time elapsed: 0.007 s  <<< ERROR!
> java.io.IOException: While executing 
> [out.println(data.userID)]:org.mozilla.javascript.EvaluatorException: syntax 
> error (JavascriptEngine#1)
>       at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>       at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 
> s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest
> [ERROR] 
> testSessionInfo(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.io.IOException: While executing [out.println(data.userID + '.' + typeof 
> data.authType)]:org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>       at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>       at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to