You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lp...@apache.org on 2023/02/04 02:59:56 UTC

[shiro] branch main updated: fix tests: better error message when payara ports clash

This is an automated email from the ASF dual-hosted git repository.

lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git


The following commit(s) were added to refs/heads/main by this push:
     new 0c2bbc45 fix tests: better error message when payara ports clash
0c2bbc45 is described below

commit 0c2bbc45c042ba1c3eccd687040428f643fd350f
Author: lprimak <le...@flowlogix.com>
AuthorDate: Fri Feb 3 20:59:22 2023 -0600

    fix tests: better error message when payara ports clash
---
 integration-tests/jakarta-ee/pom.xml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/integration-tests/jakarta-ee/pom.xml b/integration-tests/jakarta-ee/pom.xml
index 43f0ac79..4bcc46d9 100644
--- a/integration-tests/jakarta-ee/pom.xml
+++ b/integration-tests/jakarta-ee/pom.xml
@@ -316,20 +316,21 @@
                                         final int port_increment = 100
                                         final int admin_port_increment = 48
                                         int portbase = 4900 + (executor_number as int) * port_increment
+                                        int adminPort
                                         // find a free port
                                         for (; portbase < 10000; portbase += port_increment) {
                                             def server_socket
+                                            adminPort = portbase + admin_port_increment
                                             try {
-                                                server_socket = new ServerSocket(portbase + admin_port_increment)
+                                                server_socket = new ServerSocket(adminPort)
                                                 break
                                             } catch (IOException e) {
-                                                println "Admin port $server_socket.localPort is busy, trying next"
+                                                println "Admin port $adminPort is busy, trying next"
                                             } finally {
                                                 server_socket?.close()
                                             }
                                         }
 
-                                        int adminPort = portbase + admin_port_increment
                                         int sslPort = portbase + 81
 
                                         project.properties.'payara.portbase' = portbase as String