Ejemplo 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())
Ejemplo 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())
Ejemplo 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()
Ejemplo 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()