-
Notifications
You must be signed in to change notification settings - Fork 368
Add file locking integration tests for php-wasm/node #2908
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
Conversation
|
I had Claude try to fill in the remaining outlined tests. I haven't reviewed or refined the results yet, but one of the failing tests was for a real reason:
|
|
This is ready for review. This PR contains php-wasm/node rebuilds to fix a flock() bug. I would consider just merging to avoid the possibility of needing to rebuild again due to conflict, but I'd rather not merge right before going to bed. After this PR, we can add equivalent tests for Playground CLI. They should be about the same but triggered via HTTP requests. |
| * @param obj | ||
| * @returns A promised interface that wraps the synchronous interface. | ||
| */ | ||
| export function wrapSynchronousInterfaceAsPromised<T extends object>( |
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 feels weird but I get why we need it.
Motivation for the change, related issues
We have automated tests for our file lock manager but no integration tests to demonstrate locking is working between
@php-wasm/nodeinstances. Let's fix that.Implementation details
This PR:
@php-wasm/nodeThe tests coordinate between two or more concurrent
@php-wasminstances using a simple text file to gate the stages. For example, for php instances php1 and php2 testing exclusive locking:Maybe there is a better way to coordinate between instances, but so far, this seemed the most straightforward.
Once these tests are fleshed out, we can probably add nearly identical tests for Playground CLI, but run the scripts via HTTP requests.
Testing Instructions (or ideally a Blueprint)