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 2013/04/18 16:43:15 UTC

[jira] [Created] (WW-4051) JSONValidationInterceptorTest.testValidationFails in some environment fails

Maurizio Cucchiara created WW-4051:
--------------------------------------

             Summary: JSONValidationInterceptorTest.testValidationFails in some environment fails
                 Key: WW-4051
                 URL: https://issues.apache.org/jira/browse/WW-4051
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - JSON, Unit Tests
    Affects Versions: 2.3.14
         Environment: Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
Java version: 1.7.0_05
Java home: /opt/jdk1.7.0_05/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux" version: "3.2.0-39-generic" arch: "i386" Family: "unix"

            Reporter: Maurizio Cucchiara


I'm pretty sure it's related to the way in which the elements of a collection are sorted in a different environments (jre?)

Here is the outcome of the junit test.

{noformat}
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.484 sec <<< FAILURE!
testValidationFails(org.apache.struts2.json.JSONValidationInterceptorTest)  Time elapsed: 0.231 sec  <<< FAILURE!
junit.framework.ComparisonFailure: null expected:<...r"],"fieldErrors":{"[value":["Minvalueis-1"],"text":["Tooshort","Thisisnoemail]"]}}> but was:<...r"],"fieldErrors":{"[text"
:["Tooshort","Thisisnoemail"],"value":["Minvalueis-1]"]}}>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
	at org.apache.struts2.json.JSONValidationInterceptorTest.testValidationFails(JSONValidationInterceptorTest.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)

{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira