BIND 10 #346: A notify_out test fails without network connectivity
BIND 10 Development
do-not-reply at isc.org
Tue Sep 21 09:32:24 UTC 2010
#346: A notify_out test fails without network connectivity
---------------------+------------------------------------------------------
Reporter: jinmei | Owner: zhanglikun
Type: defect | Status: new
Priority: major | Milestone: y2 12 month milestone
Component: xfrout | Keywords:
Sensitive: 0 | Estimatedhours: 0.25
Hours: 0 | Billable: 1
Totalhours: 0 | Internal: 0
---------------------+------------------------------------------------------
test_send_notify_message_udp requires sendto() for a packet destined to
1.1.1.1 succeed, so it fails when the testing node is disconnected.
This is bad itself, of course, but I think we should revisit the test
design in the first place:
- IMO it should be generally avoided to rely on system level
functionality (such as sendto()) for unit tests unless we want to test
that exact functionality.
- if there's a reason we cannot avoid that, we should at least avoid
relying on sending packets outside the testing node. it's very fragile,
and could be harmful for others due to the unnecessary traffic.
Ideally we should encapsulate the socket behavior using some mock class.
If it's impossible (although I don't think so) we should at least use a
loopack address.
Another point that could be improved for notify_out_test: we shouldn't use
exisiting domain names for testing such as ".cn" or ".com". We should use
"example.com", ".example", etc.
I'm giving it to likun.
--
Ticket URL: <http://bind10.isc.org/ticket/346>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list