Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Tue, 29 Apr 2025 15:53:48 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3612: chore: use Java 21 for building pgjdbc by default In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2839421611 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3612 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3612#issuecomment-2839421611 Content-Type: text/plain; charset=utf-8 There are still two failures, and I don't understand why the tests expect certain output values: Here we fail to authenticate. Did we get the user right? Should it be pre-created when creating the DB? Should the DB be preconfigured somehow? I'm a bit lost here. ``` FAILURE 0.2sec, org.postgresql.test.util.PasswordUtilTest > mD5() java.lang.RuntimeException: Failed to authenticate using supplied user and password at org.postgresql.test.util.PasswordUtilTest.assertValidUsernamePassword(PasswordUtilTest.java:44) at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:79) at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:110) at org.postgresql.test.util.PasswordUtilTest.testUserPassword(PasswordUtilTest.java:125) at org.postgresql.test.util.PasswordUtilTest.mD5(PasswordUtilTest.java:152) Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "test_password_md5cb54c42fe0974f50" at app//org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:745) at app//org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:234) at app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:289) at app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57) at app//org.postgresql.jdbc.PgConnection.(PgConnection.java:277) at app//org.postgresql.Driver.makeConnection(Driver.java:448) at app//org.postgresql.Driver.connect(Driver.java:298) at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:683) at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:191) at app//org.postgresql.test.TestUtil.openDB(TestUtil.java:401) at app//org.postgresql.test.util.PasswordUtilTest.assertValidUsernamePassword(PasswordUtilTest.java:40) ... 4 more ``` We get "The authentication type should match ==> expected: but was: ", however, it is hard to understand why exactly something should be MD5. ``` FAILURE 0.2sec, org.postgresql.test.plugin.AuthenticationPluginTest > authPluginMD5() org.opentest4j.AssertionFailedError: The authentication type should match ==> expected: but was: at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1156) at app//org.postgresql.test.plugin.AuthenticationPluginTest.lambda$testAuthPlugin$0(AuthenticationPluginTest.java:55) at app//org.postgresql.test.plugin.AuthenticationPluginTest$DummyAuthenticationPlugin.getPassword(AuthenticationPluginTest.java:38) at app//org.postgresql.core.v3.AuthenticationPluginManager.withPassword(AuthenticationPluginManager.java:78) at app//org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:886) at app//org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:234) at app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:289) at app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57) at app//org.postgresql.jdbc.PgConnection.(PgConnection.java:277) at app//org.postgresql.Driver.makeConnection(Driver.java:448) at app//org.postgresql.Driver.connect(Driver.java:298) at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:683) at platform/java.sql@21.0.2/java.sql.DriverManager.getConnection(DriverManager.java:191) at app//org.postgresql.test.TestUtil.openDB(TestUtil.java:401) at app//org.postgresql.test.plugin.AuthenticationPluginTest.testAuthPlugin(AuthenticationPluginTest.java:57) at app//org.postgresql.test.plugin.AuthenticationPluginTest.authPluginMD5(AuthenticationPluginTest.java:67) ```