chore: cleanup tests creating crashpad handler in the test runner process (#40668)

* chore: cleanup tests creating crashpad handler in the test runner process

* ci: logging

* ci: enable logging

* ci: more logging

* ci: run all tests

* ci: more logging

* ci: increase timeout

* Revert "ci: increase timeout"

This reverts commit 870f74455da12fdcfb4b9b299944e6d549dc76f7.

* Revert "ci: more logging"

This reverts commit 46837f8b3ae4076e6628be3085ca895eba41af52.

* Revert "ci: run all tests"

This reverts commit 6a7889ce67eb3b4fa18c2c26ae86e19c7c9c44fa.

* Revert "ci: more logging"

This reverts commit 351473ab438b835f1a5761712aedd9dc9e4a393d.

* Revert "ci: enable logging"

This reverts commit 194109ed5a87392d835edfe5fd56b7237e91e209.

* Revert "ci: logging"

This reverts commit 9a3396fc7ab9a0d438822fe3b72f165b1e542286.

* chore: disable flaky ia32 tests
This commit is contained in:
Robo 2023-12-12 19:38:42 +09:00 committed by GitHub
parent a6417cc265
commit 83f15bd957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

View file

@ -10,6 +10,7 @@ import { setImmediate } from 'node:timers/promises';
const fixturesPath = path.resolve(__dirname, 'fixtures', 'api', 'utility-process');
const isWindowsOnArm = process.platform === 'win32' && process.arch === 'arm64';
const isWindows32Bit = process.platform === 'win32' && process.arch === 'ia32';
describe('utilityProcess module', () => {
describe('UtilityProcess constructor', () => {
@ -58,14 +59,14 @@ describe('utilityProcess module', () => {
expect(code).to.equal(0);
});
it('emits \'exit\' when child process crashes', async () => {
ifit(!isWindows32Bit)('emits \'exit\' when child process crashes', async () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
// Do not check for exit code in this case,
// SIGSEGV code can be 139 or 11 across our different CI pipeline.
await once(child, 'exit');
});
it('emits \'exit\' corresponding to the child process', async () => {
ifit(!isWindows32Bit)('emits \'exit\' corresponding to the child process', async () => {
const child1 = utilityProcess.fork(path.join(fixturesPath, 'endless.js'));
await once(child1, 'spawn');
const child2 = utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
@ -95,7 +96,7 @@ describe('utilityProcess module', () => {
});
describe('app \'child-process-gone\' event', () => {
it('with default serviceName', async () => {
ifit(!isWindows32Bit)('with default serviceName', async () => {
utilityProcess.fork(path.join(fixturesPath, 'crash.js'));
const [, details] = await once(app, 'child-process-gone') as [any, Electron.Details];
expect(details.type).to.equal('Utility');
@ -104,7 +105,7 @@ describe('utilityProcess module', () => {
expect(details.reason).to.be.oneOf(['crashed', 'abnormal-exit']);
});
it('with custom serviceName', async () => {
ifit(!isWindows32Bit)('with custom serviceName', async () => {
utilityProcess.fork(path.join(fixturesPath, 'crash.js'), [], { serviceName: 'Hello World!' });
const [, details] = await once(app, 'child-process-gone') as [any, Electron.Details];
expect(details.type).to.equal('Utility');