spec: allow connections to port 2049 (#33989)

Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
trop[bot]
2022-05-02 14:47:39 +09:00
committed by GitHub
parent 21b8b3064d
commit 587353dbc9

View File

@@ -28,6 +28,13 @@ v8.setFlagsFromString('--expose_gc');
app.commandLine.appendSwitch('js-flags', '--expose_gc');
app.commandLine.appendSwitch('ignore-certificate-errors');
app.commandLine.appendSwitch('disable-renderer-backgrounding');
// Some ports are considered to be "unsafe" by Chromium
// but Windows on Microsoft-hosted agents sometimes assigns one of them
// to a Node.js server. Chromium refuses to establish a connection
// and the whole app crashes with the "Error: net::ERR_UNSAFE_PORT" error.
// Let's allow connections to those ports to avoid test failures.
// Use a comma-separated list of ports as a flag value, e.g. "666,667,668".
app.commandLine.appendSwitch('explicitly-allowed-ports', '2049');
// Disable security warnings (the security warnings test will enable them)
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;