Esempio 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())
  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())
Esempio 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()
   # This should probably live in interface.close()
   interface.state = interface.State()
   super(GlobalsTest, self).tearDown()
Esempio 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()
     # This should probably live in interface.close()
     interface.state = interface.State()
     super(GlobalsTest, self).tearDown()
Esempio n. 5
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()
     self.state_patcher.stop()
 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()
   self.state_patcher.stop()