Python Simple Action Server Deadlock Test #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #4, this pull request contains a Python unit test to check for deadlocks during
simple_action_server.py
's execution. It fails with groovy-devel and hydro-devel, but passes with #6 (which is the expected behaviour).The patch is composed of three files (plus an extra line in
CMakeLists.txt
)test_simple_action_server_deadlock.py
which implements the main test using python.unittest. The script: sets up a simple action server; services requests from companions; kills the companion nodes; and checks the last serviced request wasn't too long ago.simple_action_server_deadlock_companion.py
which simply requests many concurrentTestAction
s.test_simple_action_server_deadlock_python.launch
which launches five companions and the test.I've identified the following potential issues with this patch:
RLock()
. Instead these scripts allow the deadlock to happen and then checks whether the actions are being carried out. The disadvantage is that, if deadlocked, this test will terminate only when the test timeouts andRLTestTimeoutException()
is raised (after ~75 seconds)test_simple_action_server_deadlock.py
importsrosnode
which I believe is an implicit dependency ofrospy
. I don't know if this dependency should be made explicit, leave as it, or removed (it is not vital for the test, it just makes the output cleaner).I couldn't come up with a better solution, but suggestions to improve this patch are welcome :)