Example #1
0
    def test_master_process(self):
        """
        Test
        """

        self.assertEqual(SolBase.get_master_process(), True)
        SolBase.set_master_process(False)
        self.assertEqual(SolBase.get_master_process(), False)
        SolBase.set_master_process(True)
        self.assertEqual(SolBase.get_master_process(), True)
Example #2
0
    def tearDown(self):
        """
        Setup (called on destroy)

        """

        if not SolBase.get_master_process():
            return

        logger.info("tearDown : entering")

        try:
            if self.tcp_server:
                self.tcp_server.stop_server()
        except Exception as e:
            self.fail("Exception on stop_server, ex=" + SolBase.extostr(e))

        try:
            if self.tcp_client:
                self.tcp_client.disconnect()
        except Exception as e:
            self.fail("Exception on disconnect, ex=" + SolBase.extostr(e))

        Utility.test_wait()