problems running integration tests #261

Closed
mren opened this Issue Jan 27, 2013 · 6 comments

Comments

3 participants

mren commented Jan 27, 2013

I have problems running the integration test suite, perhaps you can help me out and tell me what i'm doing wrong

i'm running on a mac with postgres 9.2 and the latest node-pg version from git

% echo "CREATE DATABASE myfoo;" | psql
CREATE DATABASE
% node script/create-test-tables.js pg://localhost:5432/myfoo
Creating table 'person'
Created!
Filling it with people
Inserted 26 people
% make test-integration connectionString=pg://localhost:5432/myfoo 
***Testing connection***
test-connection.js
testing ability to connect to '{"user":"mark","database":"myfoo","port":5432,"host":"localhost","password":null,"binary":false,"isDomainSocket":false}'
Checking for existance of required test table 'person'

***Testing Pure Javascript***
api-tests.js..........
array-tests.js...........
big-simple-query-tests.js....
cancel-query-tests.js..
configuration-tests.js....
copy-tests.js......
drain-tests.js...
empty-query-tests.js..
error-handling-tests.js..........???....
huge-numeric-tests.js
no-data-tests.js.
notice-tests.js?.
prepared-statement-tests.js.................
result-metadata-tests.js.
simple-query-tests.js......
ssl-tests.js?
transaction-tests.js.....
type-coercion-tests.js................
bound-command-tests.js..
copy-tests.js..
notification-tests.js.
query-tests.js.
double-connection-tests.js...
ending-pool-tests.js.
error-tests.js{ [error: column "procpid" does not exist]
  length: 94,
  name: 'error',
  severity: 'ERROR',
  code: '42703',
  detail: undefined,
  hint: undefined,
  position: '8',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  file: 'parse_expr.c',
  line: '766',
  routine: 'transformColumnRef' }
Message: expected error: column "procpid" does not exist to be null
AssertionError: expected error: column "procpid" does not exist to be null
    at Function.assert.isNull (/Users/mark/Documents/node-postgres/test/test-helper.js:140:10)
    at assert.success (/Users/mark/Documents/node-postgres/test/test-helper.js:103:12)
    at expect [as callback] (/Users/mark/Documents/node-postgres/test/test-helper.js:133:14)
    at p.handleError (/Users/mark/Documents/node-postgres/lib/query.js:113:10)
    at p.connect (/Users/mark/Documents/node-postgres/lib/client.js:162:24)
    at EventEmitter.emit (events.js:96:17)
    at Socket.p.attachListeners (/Users/mark/Documents/node-postgres/lib/connection.js:89:12)
    at Socket.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:397:14)

 AssertionError: expected error: column "procpid" does not exist to be null
    at Function.assert.isNull (/Users/mark/Documents/node-postgres/test/test-helper.js:140:10)
    at assert.success (/Users/mark/Documents/node-postgres/test/test-helper.js:103:12)
    at expect [as callback] (/Users/mark/Documents/node-postgres/test/test-helper.js:133:14)
    at p.handleError (/Users/mark/Documents/node-postgres/lib/query.js:113:10)
    at p.connect (/Users/mark/Documents/node-postgres/lib/client.js:162:24)
    at EventEmitter.emit (events.js:96:17)
    at Socket.p.attachListeners (/Users/mark/Documents/node-postgres/lib/connection.js:89:12)
    at Socket.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:397:14)

make: *** [test-integration] Error 1
Collaborator

booo commented Jan 28, 2013

I think the problem is related to the renaming of procpid to pid. Changelog:

http://www.postgresql.org/docs/devel/static/release-9-2.html

Not sure what's actually wrong with your setup...

mren commented Jan 28, 2013

Hey booo,

can you run the integration tests on postgres 9.2?

Collaborator

booo commented Jan 28, 2013

Does not work on 9.2. Problem is this line:

https://github.com/brianc/node-postgres/blob/master/test/integration/connection-pool/error-tests.js#L8

We have to rename procpid to pid and instead of the current_query column we maybe should use the state column.

booo added a commit to booo/node-postgres that referenced this issue Jan 28, 2013

Collaborator

booo commented Jan 28, 2013

@brianc is there a way to detect which postgres version the client is working with so we can create a conditional test?

Owner

brianc commented Jan 28, 2013

Yeah you can do a SELECT version() query. I can try to take a look @ this after work too.

Collaborator

booo commented Aug 28, 2014

The problem should be fixed by now.

@booo booo closed this Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment