From: Mukund Sivaraman Date: Mon, 8 Jul 2013 12:29:37 +0000 (+0530) Subject: [2856] Test that the state doesn't change when an exception is raised X-Git-Tag: bind10-1.2.0beta1-release~306^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af62ea00182e18f2bfa448870ca37490eb830f09;p=thirdparty%2Fkea.git [2856] Test that the state doesn't change when an exception is raised --- diff --git a/src/lib/python/isc/memmgr/tests/datasrc_info_tests.py b/src/lib/python/isc/memmgr/tests/datasrc_info_tests.py index e81f89ca9c..95057c8bc2 100644 --- a/src/lib/python/isc/memmgr/tests/datasrc_info_tests.py +++ b/src/lib/python/isc/memmgr/tests/datasrc_info_tests.py @@ -160,6 +160,7 @@ class TestSegmentInfo(unittest.TestCase): # in READY state self.__si_to_ready_state() self.assertRaises(SegmentInfoError, self.__sgmt_info.complete_update) + self.assertEqual(self.__sgmt_info.get_state(), SegmentInfo.READY) # in UPDATING state this is the same as calling # self.__si_to_synchronizing_state(), but let's try to be @@ -181,6 +182,7 @@ class TestSegmentInfo(unittest.TestCase): # in SYNCHRONIZING state self.__si_to_synchronizing_state() self.assertRaises(SegmentInfoError, self.__sgmt_info.complete_update) + self.assertEqual(self.__sgmt_info.get_state(), SegmentInfo.SYNCHRONIZING) # in COPYING state self.__si_to_copying_state()