Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
009e3066
Commit
009e3066
authored
Jul 11, 2013
by
Michal 'vorner' Vaner
Browse files
[2861] Test that we abort on unexpected errors
parent
e746e58a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/tests/datasrc_clients_builder_unittest.cc
View file @
009e3066
...
...
@@ -131,6 +131,16 @@ TEST_F(DataSrcClientsBuilderTest, commandFinished) {
EXPECT_EQ
(
1
,
result
);
}
// Test that low-level errors with the synchronization socket
// (an unexpected condition) is detected and program aborted.
TEST_F
(
DataSrcClientsBuilderTest
,
finishedCrash
)
{
command_queue
.
push_back
(
Command
(
SHUTDOWN
,
ConstElementPtr
(),
emptyCallsback
));
// Break the socket
close
(
write_end
);
EXPECT_DEATH_IF_SUPPORTED
({
builder
.
run
();},
""
);
}
TEST_F
(
DataSrcClientsBuilderTest
,
runMultiCommands
)
{
// Two NOOP commands followed by SHUTDOWN. We should see two doNoop()
// calls.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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