Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
32d029ed
Commit
32d029ed
authored
Oct 03, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test that hangs the main thread during shutdown.
parent
3285fc2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
tests/call_function_test.py
tests/call_function_test.py
+8
-1
No files found.
tests/call_function_test.py
View file @
32d029ed
import
logging
import
time
import
unittest
import
mitogen.core
...
...
@@ -71,7 +72,13 @@ class CallFunctionTest(testlib.RouterMixin, testlib.TestCase):
self
.
assertEquals
(
exc
[
0
],
mitogen
.
core
.
ChannelError
.
local_msg
)
def
test_aborted_on_local_broker_shutdown
(
self
):
assert
0
,
'todo'
stream
=
self
.
router
.
_stream_by_id
[
self
.
local
.
context_id
]
recv
=
self
.
local
.
call_async
(
time
.
sleep
,
120
)
time
.
sleep
(
0.1
)
# Ensure GIL is released
self
.
broker
.
shutdown
()
exc
=
self
.
assertRaises
(
mitogen
.
core
.
ChannelError
,
lambda
:
recv
.
get
())
self
.
assertEquals
(
exc
[
0
],
mitogen
.
core
.
ChannelError
.
local_msg
)
def
test_accepts_returns_context
(
self
):
context
=
self
.
local
.
call
(
func_accepts_returns_context
,
self
.
local
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment