You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Maurizio Cucchiara (JIRA)" <ji...@apache.org> on 2011/06/23 02:30:49 UTC

[jira] [Commented] (WW-3653) Struts2 should base on JDK5 and all tests must passing

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

Maurizio Cucchiara commented on WW-3653:
----------------------------------------

The test was totally wrong since it was order dependant. 
Java 5 with maven (neither Idea nor eclipse fail the test) ran the test in a different order.
The class CompundRootAccessor use a static cache for the invalid methods which is obviously sensitive to the test execution order.
Keep your finger crossed :)


> Struts2 should base on JDK5 and all tests must passing
> ------------------------------------------------------
>
>                 Key: WW-3653
>                 URL: https://issues.apache.org/jira/browse/WW-3653
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.2.3
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Blocker
>             Fix For: 2.3
>
>
> testFailsOnMethodThatThrowsException(com.opensymphony.xwork2.ognl.OgnlValueStack
> Test)
> Tests run: 657, Failures: 1, Errors: 0, Skipped: 0
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 38.547s
> [INFO] Finished at: Tue Jun 07 10:05:56 EDT 2011
> [INFO] Final Memory: 10M/37M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.6:test (default-test) on
> project xwork-core: There are test failures.
> [ERROR]
> [ERROR] Please refer to C:\Documents and Settings\All
> Users\Desktop\projects\struts\struts2\trunk\xwork-core\target\surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> jpyeron@reclaimed /projects/struts/struts2/trunk/xwork-core
> $
> public void testFailsOnMethodThatThrowsException() {
>    SimpleAction action = new SimpleAction();
>    OgnlValueStack stack = createValueStack();
>    stack.push(action);
>    action.setThrowException(true);
>    try {
>        stack.findValue("exceptionMethod1()", true);
>        fail("Failed to throw exception on EL method exception");
>    } catch (Exception ex) {
>        //ok
>    }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira