Skip to content

Commit 1bf3317

Browse files
committed
[grid] Returning actual last start for a slot.
1 parent a42e7b8 commit 1bf3317

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/server/src/org/openqa/selenium/grid/node/local/LocalNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,12 @@ private void killSession(SessionSlot slot) {
485485
public NodeStatus getStatus() {
486486
Set<Slot> slots = factories.stream()
487487
.map(slot -> {
488+
Instant lastStarted = Instant.EPOCH;
488489
Optional<Session> session = Optional.empty();
489490
if (!slot.isAvailable()) {
490491
ActiveSession activeSession = slot.getSession();
491492
if (activeSession != null) {
493+
lastStarted = activeSession.getStartTime();
492494
session = Optional.of(
493495
new Session(
494496
activeSession.getId(),
@@ -502,7 +504,7 @@ public NodeStatus getStatus() {
502504
return new Slot(
503505
new SlotId(getId(), slot.getId()),
504506
slot.getStereotype(),
505-
Instant.EPOCH,
507+
lastStarted,
506508
session);
507509
})
508510
.collect(toImmutableSet());

0 commit comments

Comments
 (0)