From 230f1ef168644eec9a66c26cc5a7b99fa8239f09 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine <58790826+elasticsearchmachine@users.noreply.github.com> Date: Fri, 30 Jul 2021 00:12:49 -0400 Subject: [PATCH] [TEST] Replace reference to blacklist with failed (#75866) (#75868) 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 b1114fac8a9b9..a9235dd6d2db1 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 @@ -324,7 +324,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 { @@ -336,7 +336,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 { @@ -344,8 +344,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) {