Exemplo n.º 1
0
    def test_close_stops_flush_thread(self):
        interface.state.flush_thread = interface._FlushThread(10)
        interface.state.flush_thread.start()

        self.assertTrue(interface.state.flush_thread.is_alive())
        interface.close()
        self.assertFalse(interface.state.flush_thread.is_alive())
Exemplo n.º 2
0
  def test_close_stops_flush_thread(self):
    interface.state.flush_thread = interface._FlushThread(10)
    interface.state.flush_thread.start()

    self.assertTrue(interface.state.flush_thread.is_alive())
    interface.close()
    self.assertFalse(interface.state.flush_thread.is_alive())
Exemplo n.º 3
0
 def tearDown(self):
     # It's important to call close() before un-setting the mock state object,
     # because any FlushThread started by the test is stored in that mock state
     # and needs to be stopped before running any other tests.
     interface.close()
     super(GlobalsTest, self).tearDown()
Exemplo n.º 4
0
 def tearDown(self):
   # It's important to call close() before un-setting the mock state object,
   # because any FlushThread started by the test is stored in that mock state
   # and needs to be stopped before running any other tests.
   interface.close()
   super(GlobalsTest, self).tearDown()