コード例 #1
0
    def tearDownClass(cls):
        test_common.kill_svc_monitor(cls._svc_mon_greenlet)
        test_common.kill_schema_transformer(cls._st_greenlet)
        cls.kill_kube_manager()
        super(KMTestCase, cls).tearDownClass()

        # Kill all remaining greenlets except for the main one
        gevent.killall(
            x for x in gc.get_objects()
            if isinstance(x, gevent.Greenlet) and x != greenlet.getcurrent())

        exceptions = test_common.ErrorInterceptingLogger.get_exceptions()
        if exceptions:
            raise AssertionError(
                "Tracebacks found in logs (count={}):\n\n{}".format(
                    len(exceptions),
                    "\n\n".join(msg for msg, _, __ in exceptions)))
コード例 #2
0
 def tearDown(self):
     test_common.kill_svc_monitor(self._svc_mon_greenlet)
     test_common.kill_schema_transformer(self._st_greenlet)
     super(STTestCase, self).tearDown()