Skip to content

Commit 87b257d

Browse files
Merge branch 'trunk' into firefox-entensions
2 parents b624d14 + 269a7f6 commit 87b257d

File tree

10 files changed

+135
-118
lines changed

10 files changed

+135
-118
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")

dotnet/src/webdriver/WebDriver.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -612,20 +612,7 @@ protected virtual async Task<Response> ExecuteAsync(string driverCommandToExecut
612612
{
613613
Command commandToExecute = new Command(SessionId, driverCommandToExecute, parameters);
614614

615-
Response commandResponse;
616-
617-
try
618-
{
619-
commandResponse = await this.executor.ExecuteAsync(commandToExecute).ConfigureAwait(false);
620-
}
621-
catch (System.Net.Http.HttpRequestException e)
622-
{
623-
commandResponse = new Response
624-
{
625-
Status = WebDriverResult.UnknownError,
626-
Value = e
627-
};
628-
}
615+
Response commandResponse = await this.executor.ExecuteAsync(commandToExecute).ConfigureAwait(false);
629616

630617
if (commandResponse.Status != WebDriverResult.Success)
631618
{

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 {

java/src/org/openqa/selenium/grid/log/LoggingOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ public void configureLogging() {
9898
return;
9999
}
100100

101+
// Keep current loggers if they are being manually set
102+
if (LogManager.getLogManager().getProperty("handlers") != null) return;
103+
101104
// Remove all handlers from existing loggers
102105
LogManager logManager = LogManager.getLogManager();
103106
Enumeration<String> names = logManager.getLoggerNames();

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
},

javascript/private/gen_file.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"""
2020

2121
def get_atom_name(name):
22-
# TODO: Convert camelCase and snake_case to BIG_SNAKE_CASE
22+
# We had a todo here to convert camelCase and snake_case to BIG_SNAKE_CASE, but this code
23+
# will be removed when BiDi is the default, so we're not going to bother with that.
2324
name = os.path.basename(name)
2425
return name.upper()
2526

@@ -76,7 +77,7 @@ def generate_header(file_name, out, js_map, just_declare, utf8):
7677
define_guard = "WEBDRIVER_%s" % os.path.basename(file_name.upper()).replace(".", "_")
7778
include_stddef = "" if utf8 else "\n#include <stddef.h> // For wchar_t."
7879
out.write("""%s
79-
80+
8081
/* AUTO GENERATED - DO NOT EDIT BY HAND */
8182
#ifndef %s
8283
#define %s
@@ -85,12 +86,12 @@ def generate_header(file_name, out, js_map, just_declare, utf8):
8586
8687
namespace webdriver {
8788
namespace atoms {
88-
89+
8990
""" % (_copyright, define_guard, define_guard, include_stddef))
9091

9192
string_type = "std::string" if utf8 else "std::wstring"
9293
char_type = "char" if utf8 else "wchar_t"
93-
94+
9495
for (name, file) in js_map.items():
9596
if just_declare:
9697
out.write("extern const %s* const %s[];\n" % (char_type, name.upper()))
@@ -109,7 +110,7 @@ def generate_header(file_name, out, js_map, just_declare, utf8):
109110
110111
} // namespace atoms
111112
} // namespace webdriver
112-
113+
113114
#endif // %s
114115
""" % (string_type, char_type, string_type, define_guard))
115116

@@ -123,7 +124,7 @@ def generate_cc_source(out, js_map, utf8):
123124
124125
namespace webdriver {
125126
namespace atoms {
126-
127+
127128
""" % _copyright)
128129

129130
for (name, file) in js_map.items():

0 commit comments

Comments
 (0)