fix: libuv hang on Windows (#28175)
This commit is contained in:
parent
d10398610b
commit
665ac6f9c8
7 changed files with 86 additions and 6 deletions
|
@ -7,6 +7,7 @@ import { ifdescribe, ifit } from './spec-helpers';
|
|||
import { webContents, WebContents } from 'electron/main';
|
||||
|
||||
const features = process._linkedBinding('electron_common_features');
|
||||
const mainFixturesPath = path.resolve(__dirname, 'fixtures');
|
||||
|
||||
describe('node feature', () => {
|
||||
const fixtures = path.join(__dirname, '..', 'spec', 'fixtures');
|
||||
|
@ -22,6 +23,16 @@ describe('node feature', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('does not hang when using the fs module in the renderer process', async () => {
|
||||
const appPath = path.join(mainFixturesPath, 'apps', 'libuv-hang', 'main.js');
|
||||
const appProcess = childProcess.spawn(process.execPath, [appPath], {
|
||||
cwd: path.join(mainFixturesPath, 'apps', 'libuv-hang'),
|
||||
stdio: 'inherit'
|
||||
});
|
||||
const [code] = await emittedOnce(appProcess, 'close');
|
||||
expect(code).to.equal(0);
|
||||
});
|
||||
|
||||
describe('contexts', () => {
|
||||
describe('setTimeout called under Chromium event loop in browser process', () => {
|
||||
it('Can be scheduled in time', (done) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue