Skip to content

Commit 8ef09d8

Browse files
authored
Merge branch 'trunk' into trunk
2 parents db2da10 + b9b384a commit 8ef09d8

File tree

14 files changed

+98
-47
lines changed

14 files changed

+98
-47
lines changed

common/mirror/selenium

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
[
2+
{
3+
"tag_name": "selenium-4.26.0",
4+
"assets": [
5+
{
6+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.26.0/selenium-dotnet-4.26.0.zip"
7+
},
8+
{
9+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.26.0/selenium-dotnet-strongnamed-4.26.0.zip"
10+
},
11+
{
12+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.26.0/selenium-java-4.26.0.zip"
13+
},
14+
{
15+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.26.0/selenium-server-4.26.0.jar"
16+
},
17+
{
18+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.26.0/selenium-server-4.26.0.zip"
19+
}
20+
]
21+
},
222
{
323
"tag_name": "nightly",
424
"assets": [
525
{
6-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.26.0-SNAPSHOT.zip"
26+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-java-4.27.0-SNAPSHOT.zip"
727
},
828
{
9-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.26.0-SNAPSHOT.jar"
29+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.27.0-SNAPSHOT.jar"
1030
},
1131
{
12-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.26.0-SNAPSHOT.zip"
32+
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/nightly/selenium-server-4.27.0-SNAPSHOT.zip"
1333
}
1434
]
1535
},
@@ -935,28 +955,5 @@
935955
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-2/selenium-server-4.0.0-rc-2.zip"
936956
}
937957
]
938-
},
939-
{
940-
"tag_name": "selenium-4.0.0-rc-1",
941-
"assets": [
942-
{
943-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-dotnet-4.0.0-rc1.zip"
944-
},
945-
{
946-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-dotnet-strongnamed-4.0.0-rc1.zip"
947-
},
948-
{
949-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-html-runner-4.0.0-rc-1.jar"
950-
},
951-
{
952-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-java-4.0.0-rc-1.zip"
953-
},
954-
{
955-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-server-4.0.0-rc-1.jar"
956-
},
957-
{
958-
"browser_download_url": "https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-server-4.0.0-rc-1.zip"
959-
}
960-
]
961958
}
962959
]

dotnet/selenium-dotnet-version.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BUILD FILE SYNTAX: STARLARK
22

3-
SE_VERSION = "4.26.0"
3+
SE_VERSION = "4.27.0-nightly202410301443"
44
ASSEMBLY_VERSION = "4.0.0.0"
55
SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0"]
66

java/src/org/openqa/selenium/netty/server/SeleniumHandler.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919

2020
import io.netty.channel.ChannelHandlerContext;
2121
import io.netty.channel.SimpleChannelInboundHandler;
22+
import java.util.concurrent.CompletableFuture;
2223
import java.util.concurrent.ExecutorService;
2324
import java.util.concurrent.Executors;
25+
import java.util.concurrent.Future;
2426
import org.openqa.selenium.internal.Require;
2527
import org.openqa.selenium.remote.ErrorFilter;
2628
import org.openqa.selenium.remote.http.HttpHandler;
@@ -31,18 +33,27 @@ class SeleniumHandler extends SimpleChannelInboundHandler<HttpRequest> {
3133

3234
private static final ExecutorService EXECUTOR = Executors.newCachedThreadPool();
3335
private final HttpHandler seleniumHandler;
36+
private Future<?> lastOne;
3437

3538
public SeleniumHandler(HttpHandler seleniumHandler) {
3639
super(HttpRequest.class);
3740
this.seleniumHandler = Require.nonNull("HTTP handler", seleniumHandler).with(new ErrorFilter());
41+
this.lastOne = CompletableFuture.completedFuture(null);
3842
}
3943

4044
@Override
4145
protected void channelRead0(ChannelHandlerContext ctx, HttpRequest msg) {
42-
EXECUTOR.submit(
43-
() -> {
44-
HttpResponse res = seleniumHandler.execute(msg);
45-
ctx.writeAndFlush(res);
46-
});
46+
lastOne =
47+
EXECUTOR.submit(
48+
() -> {
49+
HttpResponse res = seleniumHandler.execute(msg);
50+
ctx.writeAndFlush(res);
51+
});
52+
}
53+
54+
@Override
55+
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
56+
lastOne.cancel(true);
57+
super.channelInactive(ctx);
4758
}
4859
}

java/test/org/openqa/selenium/netty/server/NettyServerTest.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,20 @@
2828

2929
import com.google.common.collect.ImmutableMap;
3030
import java.net.URL;
31+
import java.time.Duration;
32+
import java.util.concurrent.CountDownLatch;
33+
import java.util.concurrent.TimeUnit;
3134
import java.util.concurrent.atomic.AtomicInteger;
35+
import org.junit.jupiter.api.Assertions;
3236
import org.junit.jupiter.api.Test;
37+
import org.openqa.selenium.TimeoutException;
3338
import org.openqa.selenium.grid.config.CompoundConfig;
3439
import org.openqa.selenium.grid.config.Config;
3540
import org.openqa.selenium.grid.config.MapConfig;
3641
import org.openqa.selenium.grid.server.BaseServerOptions;
3742
import org.openqa.selenium.grid.server.Server;
3843
import org.openqa.selenium.net.PortProber;
44+
import org.openqa.selenium.remote.http.ClientConfig;
3945
import org.openqa.selenium.remote.http.HttpClient;
4046
import org.openqa.selenium.remote.http.HttpRequest;
4147
import org.openqa.selenium.remote.http.HttpResponse;
@@ -141,6 +147,43 @@ void shouldNotBindToHost() {
141147
assertEquals("anyRandomHost", server.getUrl().getHost());
142148
}
143149

150+
@Test
151+
void doesInterruptPending() throws Exception {
152+
CountDownLatch interrupted = new CountDownLatch(1);
153+
Config cfg = new MapConfig(ImmutableMap.of());
154+
BaseServerOptions options = new BaseServerOptions(cfg);
155+
156+
Server<?> server =
157+
new NettyServer(
158+
options,
159+
req -> {
160+
try {
161+
Thread.sleep(800);
162+
} catch (InterruptedException ex) {
163+
interrupted.countDown();
164+
}
165+
return new HttpResponse();
166+
})
167+
.start();
168+
ClientConfig config =
169+
ClientConfig.defaultConfig()
170+
.readTimeout(Duration.ofMillis(400))
171+
.baseUri(server.getUrl().toURI());
172+
173+
// provoke a client timeout
174+
Assertions.assertThrows(
175+
TimeoutException.class,
176+
() -> {
177+
try (HttpClient client = HttpClient.Factory.createDefault().createClient(config)) {
178+
HttpRequest request = new HttpRequest(DELETE, "/session");
179+
request.setHeader("Accept", "*/*");
180+
client.execute(request);
181+
}
182+
});
183+
184+
assertTrue(interrupted.await(1000, TimeUnit.MILLISECONDS), "The handling was interrupted");
185+
}
186+
144187
private void outputHeaders(HttpResponse res) {
145188
res.forEachHeader((name, value) -> System.out.printf("%s -> %s\n", name, value));
146189
}

java/version.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
SE_VERSION = "4.26.0"
1+
SE_VERSION = "4.27.0-SNAPSHOT"
22
TOOLS_JAVA_VERSION = "17"

javascript/node/selenium-webdriver/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ load("//javascript/private:browsers.bzl", "BROWSERS")
1111

1212
npm_link_all_packages(name = "node_modules")
1313

14-
VERSION = "4.26.0"
14+
VERSION = "4.27.0-nightly202410301443"
1515

1616
BROWSER_VERSIONS = [
1717
"v85",

javascript/node/selenium-webdriver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "selenium-webdriver",
3-
"version": "4.26.0",
3+
"version": "4.27.0-nightly202410301443",
44
"description": "The official WebDriver JavaScript bindings from the Selenium project",
55
"license": "Apache-2.0",
66
"keywords": [

py/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ compile_pip_requirements(
6262
],
6363
)
6464

65-
SE_VERSION = "4.26.0"
65+
SE_VERSION = "4.27.0.dev202410301443"
6666

6767
BROWSER_VERSIONS = [
6868
"v85",

py/docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
# built documents.
5757
#
5858
# The short X.Y version.
59-
version = '4.26'
59+
version = '4.27'
6060
# The full version, including alpha/beta/rc tags.
61-
release = '4.26.0'
61+
release = '4.27.0.dev202410301443'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

py/selenium/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818

19-
__version__ = "4.26.0"
19+
__version__ = "4.27.0.dev202410301443"

0 commit comments

Comments
 (0)