You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2016/11/13 11:05:00 UTC

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

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

Lukasz Lenart updated WW-4051:
------------------------------
    Fix Version/s:     (was: 2.5.x)
                   2.5

> 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
>             Fix For: 2.5
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)