Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
33a7569f
Commit
33a7569f
authored
Dec 03, 2013
by
Thomas Markwalder
Browse files
[3087] Minor review corrections.
Fixed a typo and added a bit more diagnostic output to two unit tests.
parent
4c74dff2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/d2/nc_add.h
View file @
33a7569f
...
...
@@ -135,10 +135,10 @@ protected:
/// - INIT_ST with next event of START_EVT
///
/// The READY_ST is the state the model transitions into when the inherited
/// method, startTransaction() is invoked. This handler, therefore,
a
s the
///
is the
entry point into the state model execution.h Its primary task
///
is to
determine whether to start with a forward DNS change or a
///
reverse DNS
change.
/// method, startTransaction() is invoked. This handler, therefore,
i
s the
/// entry point into the state model execution.h Its primary task
is to
/// determine whether to start with a forward DNS change or a
reverse DNS
/// change.
///
/// Transitions to:
/// - SELECTING_FWD_SERVER_ST with next event of SERVER_SELECT_ST if request
...
...
src/bin/d2/tests/nc_add_unittests.cc
View file @
33a7569f
...
...
@@ -353,21 +353,27 @@ TEST_F(NameAddTransactionTest, selectingFwdServerHandler) {
for
(
int
i
=
0
;
i
<
num_servers
;
++
i
)
{
// Run selectingFwdServerHandler.
ASSERT_NO_THROW
(
name_add
->
selectingFwdServerHandler
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Verify that a server was selected.
ASSERT_TRUE
(
name_add
->
getCurrentServer
());
ASSERT_TRUE
(
name_add
->
getCurrentServer
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Verify that we transitioned correctly.
ASSERT_EQ
(
NameAddTransaction
::
ADDING_FWD_ADDRS_ST
,
name_add
->
getCurrState
());
name_add
->
getCurrState
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
ASSERT_EQ
(
NameChangeTransaction
::
SERVER_SELECTED_EVT
,
name_add
->
getNextEvent
());
name_add
->
getNextEvent
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Post a server IO error event. This simulates an IO error occuring
// and a need to select the new server.
ASSERT_NO_THROW
(
name_add
->
postNextEvent
(
NameChangeTransaction
::
SERVER_IO_ERROR_EVT
));
SERVER_IO_ERROR_EVT
))
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
}
// We should have exhausted the list of servers. Processing another
...
...
@@ -1082,21 +1088,28 @@ TEST_F(NameAddTransactionTest, selectingRevServerHandler) {
for
(
int
i
=
0
;
i
<
num_servers
;
++
i
)
{
// Run selectingRevServerHandler.
ASSERT_NO_THROW
(
name_add
->
selectingRevServerHandler
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Verify that a server was selected.
ASSERT_TRUE
(
name_add
->
getCurrentServer
());
ASSERT_TRUE
(
name_add
->
getCurrentServer
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Verify that we transitioned correctly.
ASSERT_EQ
(
NameAddTransaction
::
REPLACING_REV_PTRS_ST
,
name_add
->
getCurrState
());
name_add
->
getCurrState
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
ASSERT_EQ
(
NameChangeTransaction
::
SERVER_SELECTED_EVT
,
name_add
->
getNextEvent
());
name_add
->
getNextEvent
())
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
// Post a server IO error event. This simulates an IO error occuring
// and a need to select the new server.
ASSERT_NO_THROW
(
name_add
->
postNextEvent
(
NameChangeTransaction
::
SERVER_IO_ERROR_EVT
));
SERVER_IO_ERROR_EVT
))
<<
" num_servers: "
<<
num_servers
<<
" selections: "
<<
i
;
}
// We should have exhausted the list of servers. Processing another
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment