File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
java/src/org/openqa/selenium/grid/distributor/local Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -361,15 +361,8 @@ public Set<NodeStatus> getAvailableNodes() {
361361 readLock .lock ();
362362 try {
363363 return model .getSnapshot ().stream ()
364- .filter (
365- node -> {
366- // Only consider UP nodes (not DOWN, DRAINING, etc.)
367- if (!UP .equals (node .getAvailability ())) {
368- return false ;
369- }
370- // Consider node has at least one free slot
371- return node .getSlots ().stream ().anyMatch (slot -> slot .getSession () == null );
372- })
364+ // Filter nodes are UP and have capacity (available slots)
365+ .filter (node -> UP .equals (node .getAvailability ()) && node .hasCapacity ())
373366 .collect (ImmutableSet .toImmutableSet ());
374367 } finally {
375368 readLock .unlock ();
You can’t perform that action at this time.
0 commit comments