Thanks for the hint. It saved my time. However, when I try to execute the testMinimal() testcase in Hbm2JavaConstructorTest class, I get an exception.
Code:
junit.framework.ComparisonFailure: Expected were higher, Last: {TABLE_SCHEM=null, REMARKS=, TABLE_CAT=sample, TABLE_NAME=company, TABLE_TYPE=TABLE} expected:<0> but was:<1>
at org.hibernate.tool.BaseTestCase.assertHasNext(BaseTestCase.java:183)
at org.hibernate.tool.BaseTestCase.assertHasNext(BaseTestCase.java:163)
at org.hibernate.tool.BaseTestCase.assertNoTables(BaseTestCase.java:155)
at org.hibernate.tool.BaseTestCase.tearDown(BaseTestCase.java:119)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
This error is not due to the patch that I created because I tried executing the actual code from the svn and I still get the same exception. For the testcases to be executed, is there a specific schema design? I am using a database schema with few irrelevant tables.
I do not get the exception if I commented
Code:
if(actual > expected) {
throw new ComparisonFailure((reason==null?"Expected were higher":reason)+", Last: " + last, ""+expected, ""+actual);
}
from assertHasNext(String reason, int expected, Iterator iterator) test case inside the BaseTestCase class (line 182-184).
Any suggestions?