-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(tests): maybe fix flaky flock tests #12122
Conversation
cli/tests/unit/flock_test.ts
Outdated
await fileLock.waitEnterLock(); | ||
assertEquals( | ||
checkFileCanRead(filePath), | ||
false, |
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.
Looks like I didn't actually fix this because it doesn't work this way on Linux.
cli/tests/unit/flock_test.ts
Outdated
); | ||
} else { | ||
const process = await Deno.run({ | ||
cmd: ["lsof", "-p", pid.toString()], |
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.
Not available on GH actions. Sigh...
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, let's try
Removes any timing from these tests. Instead just checks that the file can be read or written based on the type of lock.
Closes #12094