Skip to content

Commit 1ad9e3b

Browse files
committed
[grid] retry if no node does support the Capabilities
1 parent 9c9cd27 commit 1ad9e3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ public Either<SessionNotCreatedException, CreateSessionResponse> newSession(
586586
new SessionNotCreatedException("Unable to create new session");
587587
for (Capabilities caps : request.getDesiredCapabilities()) {
588588
if (isNotSupported(caps)) {
589+
// e.g. the last node drained, we have to wait for a new to register
590+
lastFailure =
591+
new SessionNotCreatedException(
592+
"Unable to find a node supporting the desired capabilities");
593+
retry = true;
589594
continue;
590595
}
591596

0 commit comments

Comments
 (0)