pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rapidtransit440@aol.com
To: pgsql-jdbc@postgresql.org
Subject: Having issues with tests
Date: Sun, 23 Nov 2014 11:04:38 -0500
Message-ID: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

I recently forked Postgresql JDBC  to use some unsafe methods to get char arrays


This was before:
  41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement
  41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement
  41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement
  41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement
  41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement
  41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement
  41.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.createParameterizedQuery
  40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery
  40.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 after


Even 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 clue
expected [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 works
ERROR: could not determine data type of parameter $1
org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1
	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.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 works
ERROR: could not determine data type of parameter $1
org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1
	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.execute(AbstractJdbc2Statement.java:412)
	at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)




5. This is obvious
Large 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 clue
ERROR: column "bin" is of type bytea but expression is of type oid
  Hint: You will need to rewrite or cast the expression.
  Position: 43
org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oid
  Hint: You will need to rewrite or cast the expression.
  Position: 43
	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.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 clue
Should 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 clue
ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 46
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 46
	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.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 clue
ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 46
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 46
	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.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 clue
ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 41
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 41
	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.executeUpdate(AbstractJdbc2Statement.java:368)
	at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)




11. No clue
ERROR: 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 yet
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 class
org.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 class
	at org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)


13. No clue
ERROR: column "bin" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 65
org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigint
  Hint: You will need to rewrite or cast the expression.
  Position: 65
	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.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 installed 
Connection properties are set in src/test/resources/test.properties
My repo: https://github.com/RapidTransit/postgres






view thread (9+ messages)  latest in thread

Message-ID: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com>
Permalink:  ../8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com/
Also on:    postgresql.org/message-id/8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: rapidtransit440@aol.com
  Subject: Re: Having issues with tests
  In-Reply-To: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com>
  References: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox