BIND 10 #2823: complete removing threads from stats tests
BIND 10 Development
do-not-reply at isc.org
Mon Feb 25 22:31:56 UTC 2013
#2823: complete removing threads from stats tests
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: | Milestone: Next-Sprint-
defect | Proposed
Priority: | Keywords:
medium | Sensitive: 0
Component: | Sub-Project: DNS
statistics | Estimated Difficulty: 0
CVSS Scoring: | Total Hours: 0
Defect Severity: N/A |
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
This is a followup of #2689.
First read the analysis comments of #2689:
http://bind10.isc.org/ticket/2689#comment:3
For b10-stats.test.py, the remaining tests to be converted are:
- test_init
- test_commands
- test_command_show
- test_command_showchema
- test_polling
- test_polling2
I believe we can eliminate the need for threads like other cases: use
the `SimpleStats` mock class instead of the production `stats.Stats`,
and directly pass/inspect messages over the `ModuleCCSession`.
I guess the same approach can apply to b10-stats-httpd_test for things
that rely on threaded `BaseModules`. It (seemingly) uses threads also
for http protocol handling. If so, we need another mock or something
to eliminate; at this moment I'm not sure if it's easy or difficult.
If it makes the task too big, we can postpone that part further.
Once we remove the dependency on `BaseModules`, we should be able to
get rid of all of these things. At that point I suggest rename
`SimpleStats` (as it's not that simple any more).
I'd also suggest renaming file names by removing "b10-" for
consistency.
--
Ticket URL: <http://bind10.isc.org/ticket/2823>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list