-
Notifications
You must be signed in to change notification settings - Fork 117
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
Make asynchronous process test run asynchronously #657
Conversation
|
The update_status calls from the async process do not seem to be captured by the logging database in the test suite.
Ideas ? |
I just renamed the async test so its run at the end. Note that some of the tests modify the CONFIG, and this has effects on the following tests. It would probably be best to make sure all tests that modify the config return it to its original state. Note also that |
Hello, I did a quick code review, imo you should split dca06fb into: and to split cbd1c29, with typo fix separated from the rest. More over having a loop with proper status check instead of sleep(.5) maybe better in dca06fb |
assert_response_accepted(resp) | ||
|
||
# Wait for process to complete. The test will fail otherwise, which confirms the process is asynchronous. | ||
time.sleep(.5) |
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.
The check should be done explicitly to validate that the current status is still running with a new checkStatus
, but is not yet ProcessSucceeded
.
If the process is somehow running in sync, this would not confirm that async was applied. It would just do a small wait before checking the status of an already completed process.
Overview
The test in test_async was not running asynchronously. This PR runs the test with processing mode set to
distributed
, and confirms the process completes.Related Issue / Discussion
Fix #656
Additional Information
I moved the Sleep process definition with the other test processes.
I had trouble initially because I thought owslib would be able to read the status file. Unfortunately, owslib does not support status files on the local file system.
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)