BIND 10 #698: ModuleCCSession object may group_unsubscribe in the closed CC session in being deleted
BIND 10 Development
do-not-reply at isc.org
Fri Apr 1 07:50:04 UTC 2011
#698: ModuleCCSession object may group_unsubscribe in the closed CC session in
being deleted
-------------------------------------+-------------------------------------
Reporter: | Owner: vorner
naokikambe | Status: reviewing
Type: defect | Milestone:
Priority: major | Sprint-20110405
Component: | Resolution:
message-library | Sensitive: 0
Keywords: | Add Hours to Ticket: 0
Estimated Number of Hours: 3.0 | Total Hours: 0
Billable?: 1 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by vorner):
Good morning
Replying to [comment:10 naokikambe]:
> Further more, we may surely know this change is applied effectively if
we add the following to unittest_fakesession.py. Is that okay?
> {{{
> @@ -44,6 +44,8 @@ class FakeModuleCCSession:
> self.subscriptions[group_name].append(instance_name)
>
> def group_unsubscribe(self, group_name, instance_name = None):
> + if self._closed:
> + raise isc.cc.SessionError("Session has been closed.")
> if group_name in self.subscriptions:
> if instance_name:
> if len(self.subscriptions[group_name]) > 1:
> }}}
Yes, that woold be good.
> However I think the unittest never fails without this change even if
this exception is raised. Because this exception in deleting the object is
just ignored like this. Is that correct?
If we created a test where the object was created, closed and force-
deleted, the exception should be raised in the case it is not properly
checked (eg. without the fix). Something like this (not exact code) could
do the trick, but I didn't try it:
{{{
# Get the session somewhere
session.close()
session = None
gt.collect() # Force garbage collection, which forces deletion of the
object
}}}
Would that be possible?
Thanks
--
Ticket URL: <https://bind10.isc.org/ticket/698#comment:11>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list