[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7713 [Stem]: Stem should invalidate GETCONF cache
#7713: Stem should invalidate GETCONF cache
-----------------------------+----------------------------------------------
Reporter: atagar | Owner: atagar
Type: defect | Status: needs_revision
Priority: minor | Milestone:
Component: Stem | Version:
Keywords: controller easy | Parent:
Points: | Actualpoints:
-----------------------------+----------------------------------------------
Comment(by sreenatha):
It seems that in test_getconf
(test.integ.control.controller.TestController), where the test is failing,
the following command is being sent through the controller.
SETCONF nodefamily="abc,xyz,pqrs" nodefamily="mno,tuv,wxyz"
I've also noticed that CONF_CHANGED events with the following config are
being sent to the listener.
{'NodeFamily': 'mno,tuv,wxyz'}
{'NodeFamily': None}
So I'm guessing that the listener updates the cached value of 'nodefamily'
parameter to 'mno,tuv,wxyz' before controller.get_conf() is called in
test_getconf, resulting in a single value for 'nodefamily'. This causes
the AssertionError in the integ test. One way to make the test work would
be to set an option for not updating the cache in the test and then check
it in the listener. Implementation for this that works for the style tests
as well is available at
https://github.com/lucyd/stem/commit/21e1542c8f3ae6e28b062615896dd541ed4f4ec1
I also modified the test to check if the cache is updated when another
controller changes the config.
https://github.com/lucyd/stem/commit/78da5aece13701d2b6b3d509d2aaeb8cdb70a040
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7713#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs