pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feed[pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
7+ messages / 2 participants
[nested] [flat]
* [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-30 18:46 "yamert89 (@yamert89)" <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: yamert89 (@yamert89) @ 2026-01-30 18:46 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
I wanted to start contributing to this repository, and the first issue I faced was two test failures when using a non-standard Postgres port. I believe this is a bug and suggest a patch for it.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 10:57 "davecramer (@davecramer)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: davecramer (@davecramer) @ 2026-01-31 10:57 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
are you aware you can create a file build.local.properties and set non-standard ports ?
https://github.com/pgjdbc/pgjdbc/blob/3fab588d93ae4cfeb13f75ba08894b804b256d51/build.properties#L2
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 17:24 "yamert89 (@yamert89)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: yamert89 (@yamert89) @ 2026-01-31 17:24 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
@davecramer of course.
This is my **build.local.properties**
```
test.url.PGHOST=localhost
test.url.PGPORT=7777
secondaryServer1=localhost
secondaryPort1=7778
secondaryServer2=localhost
secondaryPort2=7779
test.url.PGDBNAME=test
user=test
password=test
privilegedUser=postgres
privilegedPassword=
sspiusername=testsspi
preparethreshold=5
sslpassword=sslpwd
```
and **docker-compose.yml**
```
services:
pgdb:
image: postgres:${PGV:-latest}
ports:
- 7777:5432
- 7778:5433
- 7779:5434
...
```
When I run the tests, I get:
```
FATAL: role "test" does not exist
org.postgresql.util.PSQLException: FATAL: role "test" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2875)
at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:3000)
at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:235)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:344)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:290)
at org.postgresql.Driver.makeConnection(Driver.java:448)
at org.postgresql.Driver.connect(Driver.java:298)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:683)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104)
at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:52)
at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:37)
at org.postgresql.test.osgi.DataSourceFactoryTest.createXADataSource(DataSourceFactoryTest.java:96)
```
This happens because `DataSourceFactoryTest.getProperties()` drops any non-standard properties.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 18:41 "davecramer (@davecramer)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: davecramer (@davecramer) @ 2026-01-31 18:41 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
looks more to me like there is no user named test
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 19:19 "yamert89 (@yamert89)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: yamert89 (@yamert89) @ 2026-01-31 19:19 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
```
yamert89@pc:~/workspace/projects/pgjdbc/docker/postgres-server$ PGV=17 SSL=no XA=yes SCRAM=yes docker compose up -d
[+] Running 2/2
✔ Network postgres-server_default Created 0.0s
✔ Container postgres-server-pgdb-1 Started 0.2s
yamert89@pc:~/workspace/projects/pgjdbc/docker/postgres-server$ docker inspect postgres-server-pgdb-1 | grep HostPort
"HostPort": "7777"
"HostPort": "7778"
"HostPort": "7779"
"HostPort": "7777"
"HostPort": "7777"
"HostPort": "7778"
"HostPort": "7778"
"HostPort": "7779"
"HostPort": "7779"
yamert89@pc:~/workspace/projects/pgjdbc/docker/postgres-server$ docker exec -it postgres-server-pgdb-1 psql -U postgres
psql (17.5 (Debian 17.5-1.pgdg120+1))
Type "help" for help.
postgres=# SELECT
datname,
has_database_privilege('test', oid, 'CONNECT') as connect,
has_database_privilege('test', oid, 'CREATE') as create
FROM pg_database
WHERE datname = 'test';
datname | connect | create
---------+---------+--------
test | t | t
(1 row)
```
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 19:33 "yamert89 (@yamert89)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: yamert89 (@yamert89) @ 2026-01-31 19:33 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
```
private static Properties getProperties() {
Properties p = loadPropertyFiles("build.properties");
p.putAll(System.getProperties());
Properties p2 = new Properties();
for (Map.Entry<Object, Object> entry : p.entrySet()) {
if (PGProperty.forName((String) entry.getKey()) != null) { // This line drops all non-standard properties
p2.put(entry.getKey(), entry.getValue());
}
}
return p2;
}
```
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests
@ 2026-01-31 21:10 "davecramer (@davecramer)" <[email protected]>
5 siblings, 0 replies; 7+ messages in thread
From: davecramer (@davecramer) @ 2026-01-31 21:10 UTC (permalink / raw)
To: pgjdbc/pgjdbc <[email protected]>
Is there a user named test ? Can you connect as test ?
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-01-31 21:10 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-30 18:46 [pgjdbc/pgjdbc] PR #3921: Support test.url.* properties in osgi tests "yamert89 (@yamert89)" <[email protected]>
2026-01-31 10:57 ` "davecramer (@davecramer)" <[email protected]>
2026-01-31 17:24 ` "yamert89 (@yamert89)" <[email protected]>
2026-01-31 18:41 ` "davecramer (@davecramer)" <[email protected]>
2026-01-31 19:19 ` "yamert89 (@yamert89)" <[email protected]>
2026-01-31 19:33 ` "yamert89 (@yamert89)" <[email protected]>
2026-01-31 21:10 ` "davecramer (@davecramer)" <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox