From b9138865e59cfbb095093eadc8cf16137be806a6 Mon Sep 17 00:00:00 2001 From: Tim Vernum Date: Thu, 29 Jul 2021 21:28:02 +1000 Subject: [PATCH] [TEST] Replace reference to blacklist with failed This commit replaces use of "blacklist" with "failed" to better reflect the behaviour of the test --- .../ldap/support/SessionFactoryLoadBalancingTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java index dce682f45055a..14feb584d7a93 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/ldap/support/SessionFactoryLoadBalancingTests.java @@ -319,7 +319,7 @@ private PortBlockingRunnable(InetAddress serverAddress, int serverPort, int port @Override public void run() { final List openedSockets = new ArrayList<>(); - final List blacklistedAddress = new ArrayList<>(); + final List failedAddresses = new ArrayList<>(); try { final boolean allSocketsOpened = waitUntil(() -> { try { @@ -331,7 +331,7 @@ public void run() { } final List inetAddressesToBind = Arrays.stream(allAddresses) .filter(addr -> openedSockets.stream().noneMatch(s -> addr.equals(s.getLocalAddress()))) - .filter(addr -> blacklistedAddress.contains(addr) == false) + .filter(addr -> failedAddresses.contains(addr) == false) .collect(Collectors.toList()); for (InetAddress localAddress : inetAddressesToBind) { try { @@ -339,8 +339,8 @@ public void run() { openedSockets.add(socket); logger.debug("opened socket [{}]", socket); } catch (NoRouteToHostException | ConnectException e) { - logger.debug(new ParameterizedMessage("blacklisting address [{}] due to:", localAddress), e); - blacklistedAddress.add(localAddress); + logger.debug(new ParameterizedMessage("marking address [{}] as failed due to:", localAddress), e); + failedAddresses.add(localAddress); } } if (openedSockets.size() == 0) {