pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rapidtransit440@aol.com
To: alexis.meneses@gmail.com
To: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Having issues with tests
Date: Tue, 25 Nov 2014 19:29:09 -0500
Message-ID: <8D1D7272140FA17-8268-12F0D@webmail-vm031.sysops.aol.com> (raw)
In-Reply-To: <CANPkoZRCgqyxy3=ynU88nXCo-VjVPcH7GcoCgpiJ=VTWvxg8eA@mail.gmail.com>
References: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com>
	<CADK3HHLXB7mJRXZSpXUakHtoqmbh1orLVKcLey1-jNh83XmqnQ@mail.gmail.com>
	<8D1D6178446EEAA-D6C-261C@webmail-va036.sysops.aol.com>
	<CADK3HH+orXupbmihYL5co6PsHcnjYBkeUtgK7BRwKfjLH8SgnQ@mail.gmail.com>
	<CANPkoZRCgqyxy3=ynU88nXCo-VjVPcH7GcoCgpiJ=VTWvxg8eA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

I downloaded the sources from here: http://jdbc.postgresql.org/download.html version 
9.3-1102 .I didn't realize there was a git repository until a few days later. I thought I had downloaded the latest stable? I'll try running the Ant task with in Gradle (Because it seems like some sort of dependency issue)


I tried again with Ant, again still can't figure out how to use it.

-----Original Message-----
From: Alexis Meneses <alexis.meneses@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: rapidtransit440 <rapidtransit440@aol.com>; List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 1:33 pm
Subject: Re: [JDBC] Having issues with tests



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.


Alexis


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 ?


Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




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 tests


What version of postgres are you running this on ?


Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca



On 23 November 2014 at 11:04,  <rapidtransit440@aol.com> wrote:

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: <8D1D7272140FA17-8268-12F0D@webmail-vm031.sysops.aol.com>
Permalink:  ../8D1D7272140FA17-8268-12F0D@webmail-vm031.sysops.aol.com/
Also on:    postgresql.org/message-id/8D1D7272140FA17-8268-12F0D@webmail-vm031.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, alexis.meneses@gmail.com, pg@fastcrypt.com
  Subject: Re: Having issues with tests
  In-Reply-To: <8D1D7272140FA17-8268-12F0D@webmail-vm031.sysops.aol.com>
  References: <8D1D54E50A52767-E88-66B80@webmail-m290.sysops.aol.com> <CADK3HHLXB7mJRXZSpXUakHtoqmbh1orLVKcLey1-jNh83XmqnQ@mail.gmail.com> <8D1D6178446EEAA-D6C-261C@webmail-va036.sysops.aol.com> <CADK3HH+orXupbmihYL5co6PsHcnjYBkeUtgK7BRwKfjLH8SgnQ@mail.gmail.com> <CANPkoZRCgqyxy3=ynU88nXCo-VjVPcH7GcoCgpiJ=VTWvxg8eA@mail.gmail.com> <8D1D7272140FA17-8268-12F0D@webmail-vm031.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