summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Test.py')
-rw-r--r--src/lib/Bcfg2/Server/Test.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Test.py b/src/lib/Bcfg2/Server/Test.py
index 72d64b828..912a8f19c 100644
--- a/src/lib/Bcfg2/Server/Test.py
+++ b/src/lib/Bcfg2/Server/Test.py
@@ -197,7 +197,7 @@ class CLI(object):
""" Get a server core, with events handled """
core = Bcfg2.Server.Core.Core()
core.load_plugins()
- core.fam.handle_events_in_interval(0.1)
+ core.block_for_fam_events(handle_events=True)
signal.signal(signal.SIGINT, get_sigint_handler(core))
return core
@@ -264,8 +264,9 @@ class CLI(object):
for client in clients:
yield ClientTest(core, client, ignore)
- TestProgram(argv=sys.argv[:1] + Bcfg2.Options.setup.nose_options,
- suite=LazySuite(generate_tests), exit=False)
+ result = TestProgram(
+ argv=sys.argv[:1] + Bcfg2.Options.setup.nose_options,
+ suite=LazySuite(generate_tests), exit=False)
# block until all children have completed -- should be
# immediate since we've already gotten all the results we
@@ -274,3 +275,7 @@ class CLI(object):
child.join()
core.shutdown()
+ if result.success:
+ os._exit(0) # pylint: disable=W0212
+ else:
+ os._exit(1) # pylint: disable=W0212