test: fix flaky test_launch_options_from_env_defaults due to missing EnvGuard (#763)
The test was reading AGENT_BROWSER_HEADED without holding ENV_MUTEX, causing a race with test_launch_options_from_env_headed_flag when tests run in parallel.
This commit is contained in:
@@ -5267,6 +5267,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_launch_options_from_env_defaults() {
|
||||
let _guard = EnvGuard::new(&["AGENT_BROWSER_HEADED"]);
|
||||
let opts = launch_options_from_env();
|
||||
assert!(opts.headless);
|
||||
assert!(opts.args.is_empty());
|
||||
|
||||
Reference in New Issue
Block a user