Commit 009e3066 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2861] Test that we abort on unexpected errors

parent e746e58a
......@@ -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.
......
Markdown is supported
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