Skip to content

Commit

Permalink
[grid] Fixing a couple of failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed May 25, 2022
1 parent 70b0bb8 commit adb5982
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ public void shouldRemoveSessionAfterNodeIsShutDownGracefully() {
Optional<Map<String, Object>> maybeResponse =
Optional.ofNullable(Values.get(httpResponse, Map.class));

assertThat(maybeResponse.isPresent()).isTrue();
String rawResponse = JSON.toJson(maybeResponse.get().get("sessionId"));
SessionId id = JSON.toType(rawResponse, SessionId.class);

Session session = sessions.get(id);

assertThat(session.getCapabilities()).isEqualTo(capabilities);
assertThat(session.getCapabilities().getBrowserName()).isEqualTo(capabilities.getBrowserName());

nodeServer.stop();

Expand Down Expand Up @@ -296,7 +297,7 @@ public void shouldRemoveSessionAfterNodeIsDown() throws URISyntaxException {
SessionId id = result.right().getSession().getId();
Session session = sessions.get(id);

assertThat(session.getCapabilities()).isEqualTo(capabilities);
assertThat(session.getCapabilities().getBrowserName()).isEqualTo(capabilities.getBrowserName());

availability.set(DOWN);

Expand Down

0 comments on commit adb5982

Please sign in to comment.