Revision e3cc4c69 test/ganeti.asyncnotifier_unittest.py

b/test/ganeti.asyncnotifier_unittest.py
46 46

  
47 47
  def handle_error(self):
48 48
    self.error_count += 1
49
    # We should also terminate while handling an error, so that any unexpected
50
    # error is registered and can be checked.
51
    os.kill(os.getpid(), signal.SIGTERM)
49
    raise
52 50

  
53 51

  
54 52
class TestSingleFileEventHandler(testutils.GanetiTestCase):
......
144 142
  def testError(self):
145 143
    self.ihandler[self.NOTIFIER_ERR].enable()
146 144
    utils.WriteFile(self.chk_files[self.NOTIFIER_ERR], data="dummy")
147
    self.mainloop.Run()
145
    self.assertRaises(errors.GenericError, self.mainloop.Run)
148 146
    self.assert_(self.notified[self.NOTIFIER_ERR])
149 147
    self.assertEquals(self.notifiers[self.NOTIFIER_ERR].error_count, 1)
150 148
    self.assertEquals(self.notifiers[self.NOTIFIER_NORM].error_count, 0)

Also available in: Unified diff