Repository navigation
Give every Chrome and Firefox session the first start's time limit - #34
Merged
Merged
Conversation
Each test starts three Chrome or Firefox sessions through BrowserDrivers, writes how long each start took, and checks that Selenium gives each session's commands at least FirstStartTimeoutSeconds. Every session after a browser's first start is made with the driver's 60 second default, which a later start on a busy runner has run past, so these fail until every session is given the longer limit (#31).
Every session after a browser's first start was made with the driver's default command limit of 60 seconds, and a later Chrome start on a busy runner ran past it. CreateChrome and CreateFirefox now pass SessionTimeoutSeconds, which is FirstStartTimeoutSeconds, to every session, on the driver the machine provides and on the one Selenium Manager fetches. The no-timeout constructors used before are the same constructors with the 60 second default, so nothing else changes. Edge keeps the default, because headless Edge hangs on the Ubuntu runners and every Edge test is ignored, so no Edge start has been measured and a hang would hold each command for five minutes. Sessions on a Selenium grid are left as they were. Refs #31.
This was referenced Nov 15, 2026
jwrosewell
marked this pull request as ready for review
November 16, 2026 09:13
This was referenced Nov 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every Chrome and Firefox session the suite starts now gives each command up to 300 seconds, the limit #28 gives a browser's first start, in place of Selenium's default of 60 seconds. Stacked on #28, whose branch is this draft's base. Refs #31.
Problem
#28 starts Chrome and Firefox once before the first test that uses them, with 300 seconds for that first start (
FirstStartTimeoutSeconds). Every session after it is still made with no limit given (BrowserDrivers.cs lines 153 to 159 at #28's head 123d5fe9), so it gets Selenium's default of 60 seconds.A later start ran past that limit in a language build. In 51degrees-rust's Examples run 43618823541 (job 132519672554, ubuntu-latest on the ubuntu-26.04 image), the third Chrome case failed after two had passed, with "The HTTP request to the remote WebDriver server for URL http://localhost:35825/session timed out after 60 seconds", from
WebDriver.StartSessioninsidenew ChromeDriver(service, options)inBrowserDrivers.CreateChrome. That is #31.What changed
Two commits on #28's head.
Selenium/SessionLimitTests.cs(categoryBrowser) hasChrome_EverySessionHasTheFirstStartLimitandFirefox_EverySessionHasTheFirstStartLimit. Each starts three sessions throughBrowserDrivers, writes how long each start took, and fails unless Selenium gives every session's commands at leastFirstStartTimeoutSeconds. Selenium offers no public way to read the limit, so the test reads the field that holds it,serverResponseTimeoutofHttpCommandExecutor(HttpCommandExecutor.cs line 42 at selenium-4.49.0), the version this suite uses, reached through the publicWebDriver.CommandExecutorandDriverServiceCommandExecutor.HttpExecutor. If a later Selenium moves the field, the test fails saying so rather than passing.Helpers/BrowserDrivers.csgainsSessionTimeoutSeconds, which isFirstStartTimeoutSeconds(line 83).CreateChromeandCreateFirefoxpass it to every session, both with the driver the machine provides and with the one Selenium Manager fetches (lines 164 to 173 and 203 to 212). In Selenium 4.49.0new ChromeDriver(options)isthis(ChromeDriverService.CreateDefaultService(), options, RemoteWebDriver.DefaultCommandTimeout)(ChromeDriver.cs lines 85 and 86), and Firefox's is the same (FirefoxDriver.cs lines 118 and 119), so the limit is the only thing that changes for a session. The README's sentence on the first start now says every Chrome and Firefox session has the 300 seconds.Two kinds of session keep the default, and the code says why.
SELENIUM_URL), which no CI of this suite uses, so no grid start has been measured either.Start times on every runner the language repositories use
From run 43761606730, on a temporary branch holding this head (d5c34d3) and a workflow that runs
SessionLimitTestsandFirstStartTestson seven runners with each test's output shown. Every job passed 6 of 6. A first start isStartOnce's, without a page load. A later session is one of the three each new test starts after it.On an unloaded runner a later start took at most 9.5 seconds and a first start at most 36.0 seconds. A later start on a busy runner has still run past 60 seconds (the Rust job above), so a later start cannot be given less than a first one. 300 seconds is more than eight times the slowest start measured here, and is the limit #28 already set for the first start. An earlier run of the same branch, 43760550442 at 547e363, also passed on all seven, but without each test's output, so its times are not in its log.
Tests
FirstStartTests' four passed.Browsertest. Only rc into main, run 43760580646, passed.What remains
rconce Start Chrome and Firefox once before the first test that uses them #28 is there.main, so they get this whenrcis released intomain. #33 mergesmainback intorcfirst.