Re: Failure in regression tests due to absence of user 'postgres' - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Failure in regression tests due to absence of user 'postgres'
Date
Msg-id CADK3HHLrJYsaSG1p2v0uyiZK5p0NdBUmV-Qw2GwKubOasV9NgQ@mail.gmail.com
Whole thread Raw
In response to Failure in regression tests due to absence of user 'postgres'  (Neha Khatri <nehakhatri5@gmail.com>)
List pgsql-jdbc
Hi,

Thanks for the suggestions


On 6 April 2017 at 00:04, Neha Khatri <nehakhatri5@gmail.com> wrote:
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 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

pgsql-jdbc by date:

Previous
From: Neha Khatri
Date:
Subject: Failure in regression tests due to absence of user 'postgres'
Next
From: Vladimir Sitnikov
Date:
Subject: Upcoming pgjdbc release: todo list