BIND 10 #2823: complete removing threads from stats tests
BIND 10 Development
do-not-reply at isc.org
Tue Apr 30 07:23:41 UTC 2013
#2823: complete removing threads from stats tests
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: defect | jinmei
Priority: medium | Status:
Component: statistics | accepted
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130514
Sub-Project: DNS | Resolution:
Estimated Difficulty: 5 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
trac2823 is ready for review.
Changes are big, but most part of them should be straightforward.
This branch mainly consists of these 3 parts:
- 8250e03: removing threads from rest of stats_test. This is an
independent change set.
- 8250e03..0a89b92: revised stats-httpd_test so we won't have to use
threads in most cases. The key is the `SimpleStatsHttpd` class
added in utils.py. It's an httpd counterpart mock class of
`SimpleStats`. With the existence of this mock, most changes to
stats-httpd should be straightforward. I tried to add more detailed
explanation in comments for trickier cases, so if there's anything
unclean please first check the comments and commit log. It still
uses threads for handling HTTP requests from a client. IMO that's
bad unittest too, but this usage of thread is relatively less
harmful in the context of this ticket, so I left it for now. I also
noticed some sockets are not cleanly closed at the end of the tests,
resulting in warnings from Python. I suspect this is also related
to the use of threads, but cannot be sure. At least for now I'd be
inclined to leave it open for the purpose of this ticket. There's
one case I actually couldn't test myself:
{{{#!python
@unittest.skipUnless(lxml_etree, "skipping XML validation with XSD")
def test_xml_validation_with_xsd(self):
}}}
as I don't have the dependency library. But according to the test
content I believe it should work independently from the changes of
this branch.
- The final three commits are pure cleanups. The size is big but
should be trivial.
I don't think we need a changelog entry for this task.
--
Ticket URL: <https://bind10.isc.org/ticket/2823#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list