Skip to content

Commit 7ef687a

Browse files
committed
Fix review comment
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 579723d commit 7ef687a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ public void purgeDeadNodes() {
243243
Instant now = Instant.now();
244244
Instant lastTouched = nodePurgeTimes.getOrDefault(id, Instant.now());
245245
Instant lostTime =
246-
lastTouched.plus(node.getHeartbeatPeriod().multipliedBy(PURGE_TIMEOUT_MULTIPLIER / 2));
246+
lastTouched.plus(
247+
node.getHeartbeatPeriod().multipliedBy(PURGE_TIMEOUT_MULTIPLIER).dividedBy(2));
247248
Instant deadTime =
248249
lastTouched.plus(node.getHeartbeatPeriod().multipliedBy(PURGE_TIMEOUT_MULTIPLIER));
249250

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ public boolean drain(NodeId nodeId) {
290290

291291
@Override
292292
public void updateNodeAvailability(URI nodeUri, NodeId id, Availability availability) {
293+
Require.nonNull("Node URI", nodeUri);
294+
Require.nonNull("Node ID", id);
295+
Require.nonNull("Availability", availability);
293296
Lock writeLock = lock.writeLock();
294297
writeLock.lock();
295298
try {

0 commit comments

Comments
 (0)