-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: extend test timeout for windows #4657
fix: extend test timeout for windows #4657
Conversation
26eefd3
to
9aba52e
Compare
@derdeka If you have time, could you please run tests against this PR? |
// If the test runs outside $home directory | ||
if (process.env.CI && !process.env.DEBUG) { | ||
process.chdir(sandbox); | ||
} else { | ||
process.chdir(rootDir); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agnes512 Does this look reasonable? I had to do this for CI test but I'm not sure how that works. I've also dropped a clause to compare the sandbox path from L266.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I find this suspicious. On the next line, we are running a cleanup script in the sandbox
directory:
Does the behavior of run-clean
depend on the current working directory? If it does not, then perhaps we can get rid of this first process.chdir
entirely, and keep the last chdir(cwd)
only?
after(function() {
// Increase the timeout to accommodate slow CI build machines
// eslint-disable-next-line no-invalid-this
this.timeout(30 * 1000);
build.clean(['node', 'run-clean', sandbox]);
process.chdir(cwd);
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a special case for tilde check. We are using sandbox that is outside the code's project root. Not setting the process.chdir
gives for example: Skipping /home/dev/workspace/loopback-next/sandbox/tilde-path-app as it is not inside the project root directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dougal83 thank you for continuing the investigation of test failures on Windows! ❤️
The commit changing test timeouts LTGM, let's discuss how to best fix the tilde test.
// If the test runs outside $home directory | ||
if (process.env.CI && !process.env.DEBUG) { | ||
process.chdir(sandbox); | ||
} else { | ||
process.chdir(rootDir); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I find this suspicious. On the next line, we are running a cleanup script in the sandbox
directory:
Does the behavior of run-clean
depend on the current working directory? If it does not, then perhaps we can get rid of this first process.chdir
entirely, and keep the last chdir(cwd)
only?
after(function() {
// Increase the timeout to accommodate slow CI build machines
// eslint-disable-next-line no-invalid-this
this.timeout(30 * 1000);
build.clean(['node', 'run-clean', sandbox]);
process.chdir(cwd);
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changed timeouts LGTM and fixed failed tests for me.
Before this change:
3088 passing (5m)
13 pending
4 failing
With your change:
3092 passing (5m)
13 pending
The changes to directory changing looks strange to me and seems unrelated. Maybe you can split this into a seperate PR as this needs more discussion or should be refactored at all.
give windows extra time to complete tests Fix loopbackio#4425 Signed-off-by: Douglas McConnachie <[email protected]>
ensure test app is remove afterward follows: loopbackio#4652 Signed-off-by: Douglas McConnachie <[email protected]>
9aba52e
to
e6362f2
Compare
Usually Cloudflare? Will manually restart test later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The chdir
fix is not pretty, but as long as it works, I think it's best to land it now and then clean it up later (if at all).
@agnes512 AFAICT from git blame
, the tilde test was introduced by you as part of #3252. Can you please review the proposed changes and check if they preserve the intent of your test?
Amen. 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for fixing it!
Give windows extra time to complete tests
Fixes #4425
fix: cleanup tilde-path-app post test …
ensure test app is remove afterward
Fixes #4652
Checklist
npm test
passes on your machine