Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Increase Mocha timeout for copying fixtures #13768

Merged
merged 1 commit into from Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/lib/cli-engine/cli-engine.js
Expand Up @@ -102,7 +102,15 @@ describe("CLIEngine", () => {
}

// copy into clean area so as not to get "infected" by this project's .eslintrc files
before(() => {
before(function() {

/*
* GitHub Actions Windows and macOS runners occasionally exhibit
* extremely slow filesystem operations, during which copying fixtures
* exceeds the default test timeout, so raise it just for this hook.
* Mocha uses `this` to set timeouts on an individual hook level.
*/
this.timeout(60 * 1000); // eslint-disable-line no-invalid-this
shell.mkdir("-p", fixtureDir);
shell.cp("-r", "./tests/fixtures/.", fixtureDir);
});
Expand Down
11 changes: 10 additions & 1 deletion tests/lib/cli-engine/file-enumerator.js
Expand Up @@ -211,7 +211,16 @@ describe("FileEnumerator", () => {
);
}

before(() => {
before(function() {

/*
* GitHub Actions Windows and macOS runners occasionally
* exhibit extremely slow filesystem operations, during which
* copying fixtures exceeds the default test timeout, so raise
* it just for this hook. Mocha uses `this` to set timeouts on
* an individual hook level.
*/
this.timeout(60 * 1000); // eslint-disable-line no-invalid-this
fixtureDir = `${os.tmpdir()}/eslint/tests/fixtures/`;
sh.mkdir("-p", fixtureDir);
sh.cp("-r", "./tests/fixtures/*", fixtureDir);
Expand Down
10 changes: 9 additions & 1 deletion tests/lib/cli.js
Expand Up @@ -82,7 +82,15 @@ describe("cli", () => {
}

// copy into clean area so as not to get "infected" by this project's .eslintrc files
before(() => {
before(function() {

/*
* GitHub Actions Windows and macOS runners occasionally exhibit
* extremely slow filesystem operations, during which copying fixtures
* exceeds the default test timeout, so raise it just for this hook.
* Mocha uses `this` to set timeouts on an individual hook level.
*/
this.timeout(60 * 1000); // eslint-disable-line no-invalid-this
fixtureDir = `${os.tmpdir()}/eslint/fixtures`;
sh.mkdir("-p", fixtureDir);
sh.cp("-r", "./tests/fixtures/.", fixtureDir);
Expand Down
10 changes: 9 additions & 1 deletion tests/lib/eslint/eslint.js
Expand Up @@ -86,7 +86,15 @@ describe("ESLint", () => {
}

// copy into clean area so as not to get "infected" by this project's .eslintrc files
before(() => {
before(function() {

/*
* GitHub Actions Windows and macOS runners occasionally exhibit
* extremely slow filesystem operations, during which copying fixtures
* exceeds the default test timeout, so raise it just for this hook.
* Mocha uses `this` to set timeouts on an individual hook level.
*/
this.timeout(60 * 1000); // eslint-disable-line no-invalid-this
shell.mkdir("-p", fixtureDir);
shell.cp("-r", "./tests/fixtures/.", fixtureDir);
});
Expand Down