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

Need ability to freeze uploads #6

Open
PVince81 opened this issue Aug 29, 2018 · 3 comments
Open

Need ability to freeze uploads #6

PVince81 opened this issue Aug 29, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@PVince81
Copy link
Contributor

This is needed to be able to test things like "job status" owncloud/core#32414 and also the ability to test behavior in case of PHP timeouts.

@PVince81
Copy link
Contributor Author

might be doable by registering a storage wrapper which slows down or pauses stream operations. The storage wrapper would override fopen() and file_put_contents() and return a wrapped steam (or stream filter)

@patrickjahns patrickjahns added the enhancement New feature or request label Aug 30, 2018
@patrickjahns
Copy link
Contributor

patrickjahns commented Aug 30, 2018

This was the initial request for this ticket: owncloud/core#32183

@PVince81
Copy link
Contributor Author

A bigger challenge I see here is not in the freezing but the unfreezing.

While it might be useful for local debugging to have sleep statements present and triggered in a storage wrapper, it becomes impractical for automated testing. In the latter case we'd need a mechanism to be able to kill these requests. It might be possible by closing the network connection on the client side but in some setups the process might continue running.

In scenarios where we want to test what happens after the delay when unfreezing, we'd need to replace the sleep statement with some kind of listener loop which waits for outside events (event queue??) that tells it to unfreeze. This would be needed for automated tests for scenarios like asynchronous PUT where we want to freeze the assembly job so we can query its status, but then unfreeze it so we can test the job status return code when the job actually finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants