Details
Description
(posted on torque-devel)
>
> I had a question about 3.3-RC3. Am I the only one for whom the
> SqlExpressionTest fails? Surely this cannot be. I am building from a
> clean svn co of the TORQUE_3_3_RC3 tag(s).
>
> $ maven jar:jar
..
> [junit] Running org.apache.torque.util.SqlExpressionTest
> [junit] Tests run: 5, Failures: 1, Errors: 0, Time elapsed: 0.623 sec
> [junit] [ERROR] TEST org.apache.torque.util.SqlExpressionTest FAILED
..
>
> BUILD FAILED
> File...... /home/brmiller/.maven/cache/maven-test-plugin-1.6.2/plugin.jelly
> Element... fail
> Line...... 181
> Column.... 54
> There were test failures.
> Total time: 17 seconds
> Finished at: Fri Feb 01 21:19:56 GMT 2008
>
I went back to 3.3-RC1 and it won't pass the same test either. And I know
I've built 3.3-RC1 from source before. It then occurred to me that we
moved our development environment to Java 1.6 since then. Rebuilding
the torque runtime (3.3-RC3) using Java 1.5 and the tests work just
fine.
It turns out that the order of the string values tested for in SqlExpressionTest.testBuildInStringObjectSqlEnumbooleanDB is different still in Sun Java 1.6 than 1.3 or 1.4 (for which cases already exist). This list of re-ordered strings is getting a bit hackish, but a simple test for the order presented in jdk 1.6 "fixes" the issue.