Thread: junit failure?
On 7.4RC2 (from today's CVS, -rREL7_4_STABLE), I get: runtest: [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite [junit] Tests run: 87, Failures: 1, Errors: 0, Time elapsed: 13.759 sec [junit] Testcase: testTables(org.postgresql.test.jdbc2.DatabaseMetaDataTest): FAILED [junit] null [junit] junit.framework.AssertionFailedError [junit] at org.postgresql.test.jdbc2.DatabaseMetaDataTest.testTables(DatabaseMetaDataT est.java:64) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25) [junit] TEST org.postgresql.test.jdbc2.Jdbc2TestSuite FAILED [junit] Testsuite: org.postgresql.test.jdbc2.optional.OptionalTestSuite [junit] Tests run: 34, Failures: 0, Errors: 0, Time elapsed: 5.396 sec [junit] Testsuite: org.postgresql.test.jdbc3.Jdbc3TestSuite [junit] Tests run: 38, Failures: 0, Errors: 0, Time elapsed: 5.373 sec test: BUILD SUCCESSFUL Total time: 27 seconds $ this is with JDK 1.4.2, from SCO. Is this a real failure or a JDK problem? -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Attachment
On Sun, 16 Nov 2003, Larry Rosenman wrote: > On 7.4RC2 (from today's CVS, -rREL7_4_STABLE), I get: > runtest: > [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite > [junit] Tests run: 87, Failures: 1, Errors: 0, Time elapsed: 13.759 sec > > [junit] Testcase: > testTables(org.postgresql.test.jdbc2.DatabaseMetaDataTest): FAILED > [junit] null > [junit] junit.framework.AssertionFailedError > [junit] at > org.postgresql.test.jdbc2.DatabaseMetaDataTest.testTables(DatabaseMetaDataT > est.java:64) Tough to tell what the problem is exactly. The JDBC tests don't have the equivalent of the main regression test's diffs that you can send around. This test could fail if you had a table in the database you are running this against that had a name starting with "test". Please try out the attached patch which adds some debug info for this particular failure. Kris Jurka
Attachment
--On Sunday, November 16, 2003 19:42:09 -0500 Kris Jurka <books@ejurka.com> wrote: > > > On Sun, 16 Nov 2003, Larry Rosenman wrote: > >> On 7.4RC2 (from today's CVS, -rREL7_4_STABLE), I get: >> runtest: >> [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite >> [junit] Tests run: 87, Failures: 1, Errors: 0, Time elapsed: 13.759 >> sec >> >> [junit] Testcase: >> testTables(org.postgresql.test.jdbc2.DatabaseMetaDataTest): FAILED >> [junit] null >> [junit] junit.framework.AssertionFailedError >> [junit] at >> org.postgresql.test.jdbc2.DatabaseMetaDataTest.testTables(DatabaseMetaDa >> taT est.java:64) > > Tough to tell what the problem is exactly. The JDBC tests don't have the > equivalent of the main regression test's diffs that you can send around. > This test could fail if you had a table in the database you are running > this against that had a name starting with "test". Please try out the > attached patch which adds some debug info for this particular failure. > > Kris Jurka Here ya go: testjar: [mkdir] Created dir: /home/ler/pg-dev/pgsql/src/interfaces/jdbc/build/tests [javac] Compiling 32 source files to /home/ler/pg-dev/pgsql/src/interfaces/jdbc/build/tests [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [jar] Building jar: /home/ler/pg-dev/pgsql/src/interfaces/jdbc/jars/postgresql-tests.jar runtest: [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite [junit] Tests run: 87, Failures: 1, Errors: 0, Time elapsed: 13.085 sec [junit] ------------- Standard Output --------------- [junit] TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE [junit] null, public, test_b, descr, 12, text, -1, null, 0, 10, 1, null, null, null, null, -1, 1, YES [junit] null, public, test_b, imageid, 4, int4, 4, null, 0, 10, 1, null, null, null, null, 4, 2, YES [junit] null, public, test_b, id, 4, int4, 4, null, 0, 10, 1, null, null, null, null, 4, 3, YES [junit] null, public, testmetadata, id, 4, int4, 4, null, 0, 10, 1, this is a column comment, null, null, null, 4, 1, YES [junit] null, public, testmetadata, name, 12, text, -1, null, 0, 10, 1, null, null, null, null, -1, 2, YES [junit] null, public, testmetadata, updated, 93, timestamp, 8, null, 0, 10, 1, null, null, null, null, 8, 3, YES [junit] ------------- ---------------- --------------- [junit] Testcase: testTables(org.postgresql.test.jdbc2.DatabaseMetaDataTest): FAILED [junit] null [junit] junit.framework.AssertionFailedError [junit] at org.postgresql.test.jdbc2.DatabaseMetaDataTest.testTables(DatabaseMetaDataT est.java:67) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25) [junit] TEST org.postgresql.test.jdbc2.Jdbc2TestSuite FAILED [junit] Testsuite: org.postgresql.test.jdbc2.optional.OptionalTestSuite [junit] Tests run: 34, Failures: 0, Errors: 0, Time elapsed: 4.878 sec [junit] Testsuite: org.postgresql.test.jdbc3.Jdbc3TestSuite [junit] Tests run: 38, Failures: 0, Errors: 0, Time elapsed: 6.326 sec test: BUILD SUCCESSFUL Total time: 31 seconds $ -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Attachment
On Sun, 16 Nov 2003, Larry Rosenman wrote: > > Tough to tell what the problem is exactly. The JDBC tests don't have the > > equivalent of the main regression test's diffs that you can send around. > > This test could fail if you had a table in the database you are running > > this against that had a name starting with "test". Please try out the > > attached patch which adds some debug info for this particular failure. > > > > Kris Jurka > > [junit] ------------- Standard Output --------------- > [junit] TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, > TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, > NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, > CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE > [junit] null, public, test_b, descr, 12, text, -1, null, 0, 10, 1, > null, null, null, null, -1, 1, YES > [junit] null, public, test_b, imageid, 4, int4, 4, null, 0, 10, 1, > null, null, null, null, 4, 2, YES > [junit] null, public, test_b, id, 4, int4, 4, null, 0, 10, 1, null, > null, null, null, 4, 3, YES > [junit] null, public, testmetadata, id, 4, int4, 4, null, 0, 10, 1, > this is a column comment, null, null, null, 4, 1, YES > [junit] null, public, testmetadata, name, 12, text, -1, null, 0, 10, 1, > null, null, null, null, -1, 2, YES > [junit] null, public, testmetadata, updated, 93, timestamp, 8, null, 0, > 10, 1, null, null, null, null, 8, 3, YES > [junit] ------------- ---------------- --------------- This shows that a table named test_b is in the database. This nearly certainly came from you previously running example/metadata which creates a table of that design. I can't understand why you aren't seeing tables test_a or test_c here though. In any case it is not a jdbc problem. If you log into the test database and delete any objects you find there the unit tests should run through with no errors. Kris Jurka
On Sun, Nov 16, 2003 at 07:42:09PM -0500, Kris Jurka wrote: > > > On Sun, 16 Nov 2003, Larry Rosenman wrote: > > > On 7.4RC2 (from today's CVS, -rREL7_4_STABLE), I get: > > runtest: > > [junit] Testsuite: org.postgresql.test.jdbc2.Jdbc2TestSuite > > [junit] Tests run: 87, Failures: 1, Errors: 0, Time elapsed: 13.759 sec > > > > [junit] Testcase: > > testTables(org.postgresql.test.jdbc2.DatabaseMetaDataTest): FAILED > > [junit] null > > [junit] junit.framework.AssertionFailedError > > [junit] at > > org.postgresql.test.jdbc2.DatabaseMetaDataTest.testTables(DatabaseMetaDataT > > est.java:64) > > Tough to tell what the problem is exactly. The JDBC tests don't have the > equivalent of the main regression test's diffs that you can send around. > This test could fail if you had a table in the database you are running > this against that had a name starting with "test". Please try out the > attached patch which adds some debug info for this particular failure. Here's a quick patch that changes some of the assertTrue calls to assertEquals, which produces a more useful assertion failure message. -O
Attachment
--On Sunday, November 16, 2003 20:13:10 -0500 Kris Jurka <books@ejurka.com> wrote: > > > On Sun, 16 Nov 2003, Larry Rosenman wrote: > >> > Tough to tell what the problem is exactly. The JDBC tests don't have >> > the equivalent of the main regression test's diffs that you can send >> > around. This test could fail if you had a table in the database you >> > are running this against that had a name starting with "test". Please >> > try out the attached patch which adds some debug info for this >> > particular failure. >> > >> > Kris Jurka >> >> [junit] ------------- Standard Output --------------- >> [junit] TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE, >> TYPE_NAME, COLUMN_SIZE, BUFFER_LENGTH, DECIMAL_DIGITS, NUM_PREC_RADIX, >> NULLABLE, REMARKS, COLUMN_DEF, SQL_DATA_TYPE, SQL_DATETIME_SUB, >> CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE >> [junit] null, public, test_b, descr, 12, text, -1, null, 0, 10, 1, >> null, null, null, null, -1, 1, YES >> [junit] null, public, test_b, imageid, 4, int4, 4, null, 0, 10, 1, >> null, null, null, null, 4, 2, YES >> [junit] null, public, test_b, id, 4, int4, 4, null, 0, 10, 1, null, >> null, null, null, 4, 3, YES >> [junit] null, public, testmetadata, id, 4, int4, 4, null, 0, 10, 1, >> this is a column comment, null, null, null, 4, 1, YES >> [junit] null, public, testmetadata, name, 12, text, -1, null, 0, 10, >> 1, null, null, null, null, -1, 2, YES >> [junit] null, public, testmetadata, updated, 93, timestamp, 8, null, >> 0, 10, 1, null, null, null, null, 8, 3, YES >> [junit] ------------- ---------------- --------------- > > This shows that a table named test_b is in the database. This nearly > certainly came from you previously running example/metadata which creates > a table of that design. I can't understand why you aren't seeing tables > test_a or test_c here though. In any case it is not a jdbc problem. If > you log into the test database and delete any objects you find there the > unit tests should run through with no errors. Thank You. That indeed fixed it. LER > > Kris Jurka -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749