Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
908c1b11
Commit
908c1b11
authored
Jan 04, 2012
by
Michal 'vorner' Vaner
Browse files
[805] Make the test exception more concrete
parent
5565505e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/server_common/tests/portconfig_unittest.cc
View file @
908c1b11
...
...
@@ -226,7 +226,8 @@ TEST_F(InstallListenAddresses, rollback) {
"Released before rollback"
);
sock_requestor_
.
given_tokens_
.
clear
();
// This should not bind them, but should leave the original addresses
EXPECT_THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
),
exception
);
EXPECT_THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
),
SocketRequestor
::
SocketError
);
checkAddresses
(
valid_
,
"After rollback"
);
// Now, it should have requested first pair of sockets from the invalids
// and, as the second failed, it should have returned them right away.
...
...
@@ -263,7 +264,8 @@ TEST_F(InstallListenAddresses, brokenRollback) {
// Don't check the tokens now, we already do it in rollback and valid tests
sock_requestor_
.
given_tokens_
.
clear
();
sock_requestor_
.
break_rollback_
=
true
;
EXPECT_THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
),
exception
);
EXPECT_THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
),
SocketRequestor
::
SocketError
);
// No addresses here
EXPECT_TRUE
(
store_
.
empty
());
// These should be requested in the first part of the failure to bind
...
...
Write
Preview
Supports
Markdown
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