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

Write special debug app to slow down parts of ownCloud #94

Open
PVince81 opened this issue May 26, 2015 · 4 comments
Open

Write special debug app to slow down parts of ownCloud #94

PVince81 opened this issue May 26, 2015 · 4 comments

Comments

@PVince81
Copy link

Since race conditions are difficult to test, one idea would be to write a special app that makes the following possible:

  1. Create artificial delays in specific parts of the code:
  • in pre/post hooks
  • storage wrapper methods
  • stream wrapper methods (ex: delay stream_write)
  • cache wrapper that slows down cache updates (ex: rename case)
  • implement a special external storage backend based on Local, but that slows down operations
  1. Trigger exceptions
  • trigger pre-configured exceptions in hooks (to simulate failures)
  • return specific failure codes for file named "errortest-404" (returns 404), "errortest-403" (returns 403), etc (can be useful to test the sync client's response to specific errors) CC @dragotin
  1. Additional ideas:
  • react to special file names "lock-XXX" and keeps them locked
  • configurable through public APIs ? (so the app can be enabled and driven by tests)

@jnfrmarks @nickvergessen @icewind1991

@PVince81 PVince81 changed the title Write special app to slow down parts of ownCloud Write special debug app to slow down parts of ownCloud May 26, 2015
@PVince81
Copy link
Author

This is because some race conditions can be reproduced consistently by manually adding sleep() operations in the ownCloud code, like here: owncloud/core#13391 (comment)

@PVince81
Copy link
Author

  • locking provider that stores locks in "privatedata", makes it possible to lock resources permanently for testing by using the " privatedata" OCS calls
  • or alternatively the app provides its own OCS calls to permalock files for testing
  • API call.to check locks or return special attribute in PROPFIND

@jnfrmarks
Copy link

@jvillafanez

@nickvergessen
Copy link

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

3 participants