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

Storage wrapper in testing app to simulate upload timeout #32183

Closed
PVince81 opened this issue Jul 27, 2018 · 7 comments
Closed

Storage wrapper in testing app to simulate upload timeout #32183

PVince81 opened this issue Jul 27, 2018 · 7 comments

Comments

@PVince81
Copy link
Contributor

To test cases like #32170, one currently needs to patch the OC code to simulate timeouts.

One idea would be to add an extension for the "testing" app to enable random or controlled failures during uploads:

  • have oc_appconfig setting for the "testing" app to enable chunk failures
  • oc_appconfig setting to specify what chunk indices will have a timeout failure (ex: 1, 5, 8 or none for random)
  • the testing app will install a storage wrapper which will, when configured, introduce a timeout in file operations like "fopen" and "file_put_contents"

@DeepDiver1975 @phil-davis @patrickjahns @davitol @butonic

@PVince81
Copy link
Contributor Author

this could be used to generate deterministic failures in web UI acceptance tests (chunked upload) by setting expected failures on specific chunk ids

@phil-davis
Copy link
Contributor

and @individual-it

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #22485 (test), #22492 (test), #31579 (test), #11729 (owncloud app upload issue), and #5163 (No uploads possible - Insufficient storage).

@individual-it
Copy link
Member

what about using netem https://wiki.linuxfoundation.org/networking/netem to simulate problematic networks. We could place it in the docker container

@PVince81
Copy link
Contributor Author

in general it depends whether you want deterministic or non-deterministic tests

in the case of deterministic you'll get exactly the failure you expect
non-deterministic, sometimes tests will pass, sometimes they might not... not ideal for CI

@patrickjahns
Copy link
Contributor

@PVince81
Please consider, that any behavior the testing app can/should change, is doable remotely.

It's about keeping ownCloud as a "blackbox" which we can fortunately alter it's behavior inside to achieve deterministic outcomes. We are moving towards a server <----> client approach. Thus we will need to be able to provide "a client" with a implementation of the server api that can be altered.

@individual-it
netem as simulation is fine for using explorative (manual) testing - or additional explorative testing before/during/after a release. But as vincent said, for certain parts we require deterministic behavior to write stable test suites

@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants