mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Address transport test hang
It would appear that if an attribute error is raised when trying to detect a class atter, that the test suite does not run the class teardown method but continues regardless. This fixes the class attr error which then allows the teardown to run. Prior to this, if the teardown did not run, the entire suite would hang out shutdown because it was blocked on waiting for a ioloop to terminate.
This commit is contained in:
parent
d7e28d24a4
commit
c4393d5e9e
1 changed files with 11 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import time
|
||||
import threading
|
||||
import platform
|
||||
|
||||
|
@ -81,10 +82,18 @@ class BaseZMQReqCase(TestCase):
|
|||
def tearDownClass(cls):
|
||||
# Attempting to kill the children hangs the test suite.
|
||||
# Let the test suite handle this instead.
|
||||
# cls.process_manager.kill_children()
|
||||
# time.sleep(2) # Give the procs a chance to fully close before we stop the io_loop
|
||||
cls.process_manager.kill_children()
|
||||
time.sleep(2) # Give the procs a chance to fully close before we stop the io_loop
|
||||
cls.io_loop.stop()
|
||||
cls.server_channel.close()
|
||||
del cls.server_channel
|
||||
|
||||
@classmethod
|
||||
def _handle_payload(cls, payload):
|
||||
'''
|
||||
TODO: something besides echo
|
||||
'''
|
||||
return payload, {'fun': 'send_clear'}
|
||||
|
||||
|
||||
class ClearReqTestCases(BaseZMQReqCase, ReqChannelMixin):
|
||||
|
|
Loading…
Add table
Reference in a new issue