Commit 908c1b11 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[805] Make the test exception more concrete

parent 5565505e
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment