BIND 10 #3264: Refactor d2 unit tests to use new new TransactionTest class
BIND 10 Development
do-not-reply at isc.org
Wed Jan 15 13:03:15 UTC 2014
#3264: Refactor d2 unit tests to use new new TransactionTest class
-------------------------------------+-------------------------------------
Reporter: tmark | Owner: tmark
Type: enhancement | Status:
Priority: medium | reviewing
Component: dhcp-ddns | Milestone: DHCP-
Keywords: | Kea1.0
Sensitive: 0 | Resolution:
Sub-Project: DHCP | CVSS Scoring:
Estimated Difficulty: 0 | Defect Severity: N/A
Total Hours: 5 | Feature Depending on Ticket:
| Add Hours to Ticket: 1
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by tmark):
Replying to [comment:8 marcin]:
> Reviewed commit faf86ad3a04fc7fca0af2b9d19abba0fa1d94387
>
> Changes are pretty straight forward. Just some minor things...
>
> '''nc_trans_unittests.cc'''
> doOneExchange should be documented
>
Oops. Done.
> sendUPdateTimeout: I have to admit I was not familiar with the
!''ASSERT_NO_FATAL_FAILURE!'' macro. I greped the bind10 code and the only
occurences I found were in nc_trans_unittests.cc. Since, it is the only
place where it is used, it would be useful to have some short explanation
why it has to be used. I am surprised that we never used it anywhere else.
If method-A calls method-B and an ASSERT inside method-B fails, the
failure will cause method-B to be aborted, method-A will continue to
execute. Using this macro around method-B inside method-A will cause
method-A to abort also. It is a bit like the difference between EXPECT
and ASSERT.
The method, doOneExchange, can suffer fatal assertions which invalidate
not only it but the calling method or test as well. In other words, if
the doOneExchange blows up the rest of test is pointless. I use
ASSERT_NO_FATAL_FAILURE to abort the test immediately.
>
> Please check the alignment of parameters passed to ''doOneExchange''.
>
Got it
> Why did you check in the src/bin/d2/tests/test_data_files_config.h.in
file?
>
>
I fixed the copyright.
--
Ticket URL: <http://bind10.isc.org/ticket/3264#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list