Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMZkj-002jZ8-Ie for pgsql-jdbc-commits@arkaria.postgresql.org; Thu, 20 Jul 2023 19:55:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMZkg-00G8ZW-85 for pgsql-jdbc-commits@arkaria.postgresql.org; Thu, 20 Jul 2023 19:55:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMZkf-00G8Y7-Vy for pgsql-jdbc-commits@lists.postgresql.org; Thu, 20 Jul 2023 19:55:54 +0000 Received: from out-21.smtp.github.com ([192.30.252.204]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMZkd-000Yeo-Gz for pgsql-jdbc-commits@lists.postgresql.org; Thu, 20 Jul 2023 19:55:52 +0000 Received: from github.com (hubbernetes-node-3575bba.ac4-iad.github.net [10.52.141.24]) by smtp.github.com (Postfix) with ESMTPA id BE3167011A4 for ; Thu, 20 Jul 2023 12:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2023; t=1689882950; bh=Hah0lLunuz9THRLuHLf6T+0rn5LmWWVx+0ElgkBx+10=; h=Date:From:To:Subject:From; b=djyYN4TNzyxiYlT+RgfIG6I/603SB5d2hGP0H64vKMzduk0WsGiOeGyOWtXj43ghK Rwxj+SanbPhwQlMuxNq8cQKknK1hrPpetUgm0NlQHpNxMn3beLPUOKduK/a5gkwhyJ Udi9d0a8GrX0tI875ag5x3bEo0YoOkrgF/KAe8sM= Date: Thu, 20 Jul 2023 12:55:50 -0700 From: Dave Cramer To: pgsql-jdbc-commits@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] aff581: Fix Issue #2928 number of ports not equal to numbe... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc-commits@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: aff581fe806f1c1cdc8bcd9e5a981e37691b44b5 https://github.com/pgjdbc/pgjdbc/commit/aff581fe806f1c1cdc8bcd9e5a981e37691b44b5 Author: Dave Cramer Date: 2023-07-20 (Thu, 20 Jul 2023) Changed paths: M pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java M pgjdbc/src/test/java/org/postgresql/test/jdbc2/optional/BaseDataSourceFailoverUrlsTest.java Log Message: ----------- Fix Issue #2928 number of ports not equal to number of servers in datasource (#2929) * In BaseDataSource, check to make sure the number of servers is equal to the number of ports. Throw an IllegalArgumentException if they are not. Added test case to ensure * changed test to remove nesting Add the ports and server names to the error message