Re: Having issues with tests - Mailing list pgsql-jdbc
From | Alexis Meneses |
---|---|
Subject | Re: Having issues with tests |
Date | |
Msg-id | CANPkoZRCgqyxy3=ynU88nXCo-VjVPcH7GcoCgpiJ=VTWvxg8eA@mail.gmail.com Whole thread Raw |
In response to | Re: Having issues with tests (Dave Cramer <pg@fastcrypt.com>) |
Responses |
Re: Having issues with tests
|
List | pgsql-jdbc |
Hi,
It seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
AlexisIt seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
2014-11-24 17:31 GMT+01:00 Dave Cramer <pg@fastcrypt.com>:
I run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
pgsql-jdbc by date: