From 139af72bf906730fcddf57be1ba981a26b482429 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Thu, 25 Jul 2024 16:51:18 +0700 Subject: [PATCH] [grid] Exclude status DRAINING when distributor getting available nodes (#14282) Signed-off-by: Viet Nguyen Duc --- .../selenium/grid/distributor/local/LocalDistributor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java b/java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java index 01eded126079d9..280593e5df9e35 100644 --- a/java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java +++ b/java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java @@ -505,7 +505,9 @@ protected Set getAvailableNodes() { readLock.lock(); try { return model.getSnapshot().stream() - .filter(node -> !DOWN.equals(node.getAvailability())) + .filter( + node -> + !DOWN.equals(node.getAvailability()) && !DRAINING.equals(node.getAvailability())) .collect(toImmutableSet()); } finally { readLock.unlock();