Skip to content

Commit 00abb63

Browse files
authored
Merge branch 'trunk' into nullaway
2 parents d941c18 + 269a7f6 commit 00abb63

File tree

4 files changed

+119
-90
lines changed

4 files changed

+119
-90
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
2020
bazel_dep(name = "rules_dotnet", version = "0.16.1")
2121
bazel_dep(name = "rules_java", version = "7.11.1")
2222
bazel_dep(name = "rules_jvm_external", version = "6.6")
23-
bazel_dep(name = "rules_nodejs", version = "6.3.0")
23+
bazel_dep(name = "rules_nodejs", version = "6.3.2")
2424
bazel_dep(name = "rules_oci", version = "1.7.6")
2525
bazel_dep(name = "rules_pkg", version = "0.10.1")
2626
bazel_dep(name = "rules_python", version = "0.33.0")

java/src/org/openqa/selenium/grid/commands/EventBusCommand.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
import com.google.auto.service.AutoService;
2727
import com.google.common.collect.ImmutableMap;
2828
import com.google.common.collect.ImmutableSet;
29+
import java.util.ArrayList;
2930
import java.util.Collections;
31+
import java.util.List;
3032
import java.util.Set;
3133
import java.util.concurrent.CountDownLatch;
3234
import java.util.concurrent.TimeUnit;
@@ -107,6 +109,24 @@ public Server<?> asServer(Config initialConfig) {
107109
EventBus bus = events.getEventBus();
108110

109111
BaseServerOptions serverOptions = new BaseServerOptions(config);
112+
List<CountDownLatch> pending = new ArrayList<>();
113+
114+
EventName healthCheck = new EventName("healthcheck");
115+
bus.addListener(
116+
new EventListener<>(
117+
healthCheck,
118+
Object.class,
119+
obj -> {
120+
synchronized (pending) {
121+
// Concurrent health checks might influence each other, we can ignore this.
122+
// We only want to see any event is delivered to tell the bus is healthy.
123+
pending.removeIf(
124+
latch -> {
125+
latch.countDown();
126+
return true;
127+
});
128+
}
129+
}));
110130

111131
return new NettyServer(
112132
serverOptions,
@@ -117,10 +137,10 @@ public Server<?> asServer(Config initialConfig) {
117137
req -> {
118138
CountDownLatch latch = new CountDownLatch(1);
119139

120-
EventName healthCheck = new EventName("healthcheck");
121-
bus.addListener(
122-
new EventListener<>(
123-
healthCheck, Object.class, obj -> latch.countDown()));
140+
synchronized (pending) {
141+
pending.add(latch);
142+
}
143+
124144
bus.fire(new Event(healthCheck, "ping"));
125145

126146
try {

javascript/grid-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"pretty-ms": "9.1.0",
2323
"react": "18.3.1",
2424
"react-dom": "18.3.1",
25-
"react-modal": "3.16.1",
25+
"react-modal": "3.16.3",
2626
"react-router-dom": "6.27.0",
2727
"source-map-explorer": "2.5.3"
2828
},
@@ -51,7 +51,7 @@
5151
"@testing-library/jest-dom": "6.6.3",
5252
"@testing-library/react": "14.3.1",
5353
"@testing-library/user-event": "14.5.2",
54-
"esbuild": "0.24.0",
54+
"esbuild": "0.24.2",
5555
"ts-standard": "12.0.2",
5656
"typescript": "5.6.3"
5757
},

0 commit comments

Comments
 (0)