Failure in regression tests due to absence of user 'postgres'

From: Neha Khatri <nehakhatri5(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Failure in regression tests due to absence of user 'postgres'
Date: 2017-04-06 04:04:22
Message-ID: CAFO0U+8sTKGfmCi9-y+p0_WsJm9ZNcjHd6wWuRLc_G73Gu-NQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I recently happened to execute the JDBC driver regression with following
configuration.

PostgreSQL Server : 9.6.2
PostgreSQL JDBC Driver: JDBC 4.2 9.4.1213

I followed the instructions in the page
https://jdbc.postgresql.org/development/development.html#Test_Suite.

I got following failure:
Tests run: 3074, Failures: 2, Errors: 1, Skipped: 0, Time elapsed: 199.663
sec <<< FAILURE! - in org.postgresql.test.jdbc2.Jdbc2TestSuite
testConcurrentReplace(org.postgresql.test.jdbc2.BlobTransactionTest) Time
elapsed: 0.039 sec <<< ERROR!
org.postgresql.util.PSQLException: FATAL: role "postgres" does not exist
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
at
org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2586)
at
org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:113)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:52)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:216)
at org.postgresql.Driver.makeConnection(Driver.java:404)
at org.postgresql.Driver.connect(Driver.java:272)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.postgresql.test.TestUtil.openPrivilegedDB(TestUtil.java:255)
at
org.postgresql.test.jdbc2.BlobTransactionTest.setUp(BlobTransactionTest.java:52)

In the instructions it is not mentioned that the User "postgres" should be
present in the Server instance. Should that be mentioned in the
instructions?

Later I created the user "postgres" using the command "createuser -s
postgres", because without superuser privilege for "postgres" another
failure was seen. After creating the postgres user , above failure was not
seen.

Should this be mentioned somewhere in the test execution steps, that having
a 'postgres' user is a prerequisite.

Also, the instructions have the step to create a user 'test':

createuser -d -A test -P

The '-A' is an deprecated option in Postgres. Should it still be
recommended to the users? Is there a specific reason behind specifying '-A'
option while creating the user 'test'.

Regards,
Neha

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2017-04-06 10:32:13 Re: Failure in regression tests due to absence of user 'postgres'
Previous Message Vladimir Gordiychuk 2017-04-05 22:16:39 Re: Logical Replication: adjacent COMMIT messages with the wrong StartLSN