Skip to content

Commit

Permalink
refactor(MobileRemoteProxy): modify 'Node is down' logs
Browse files Browse the repository at this point in the history
  • Loading branch information
akamarouski committed Jan 25, 2024
1 parent 7f995eb commit a720472
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public TestSession getNewSession(Map<String, Object> requestedCapability) {
getTestSlots().stream()
.findAny()
.ifPresent((slot -> {
LOGGER.info(() -> String.format("Node is down: '%s:%s' - '%s (%s)'",
LOGGER.info(() -> String.format("Node is down: '[%s]-'%s:%s' (%s)'",
CapabilityUtils.getAppiumCapability(slot.getCapabilities(), "deviceName")
.orElse(StringUtils.EMPTY),
Optional.of(slot)
.map(TestSlot::getProxy)
.map(RemoteProxy::getRemoteHost)
Expand All @@ -85,8 +87,9 @@ public TestSession getNewSession(Map<String, Object> requestedCapability) {
.map(URL::getPort)
.map(String::valueOf)
.orElse(StringUtils.EMPTY),
CapabilityUtils.getAppiumCapability(slot.getCapabilities(), "udid"),
CapabilityUtils.getAppiumCapability(slot.getCapabilities(), "deviceName"))
CapabilityUtils.getAppiumCapability(slot.getCapabilities(), "udid")
.orElse(StringUtils.EMPTY)
)
);
}));
return null;
Expand Down

0 comments on commit a720472

Please sign in to comment.