Skip to content

Commit

Permalink
[grid] Retrying session creation for all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Nov 10, 2020
1 parent b0eed0a commit 9320d5c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import static org.openqa.selenium.remote.RemoteTags.CAPABILITIES_EVENT;
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID;
import static org.openqa.selenium.remote.RemoteTags.SESSION_ID_EVENT;
import static org.openqa.selenium.remote.http.Contents.bytes;
import static org.openqa.selenium.remote.http.Contents.reader;
import static org.openqa.selenium.remote.http.Route.delete;
import static org.openqa.selenium.remote.http.Route.get;
Expand Down Expand Up @@ -248,8 +247,8 @@ public Either<SessionNotCreatedException, CreateSessionResponse> newSession(
attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(),
EventAttribute.setValue("Unable to create session: " + e.getMessage()));
span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);

return Either.left(e);
SessionNotCreatedException exception = new RetrySessionRequestException(e.getMessage());
return Either.left(exception);
} catch (IOException e) {
span.setAttribute("error", true);
span.setStatus(Status.UNKNOWN);
Expand Down

0 comments on commit 9320d5c

Please sign in to comment.