Merge remote-tracking branch 'origin/aku/error-context' into HEAD

This commit is contained in:
Alexander Kuzmenkov 2020-10-02 14:38:55 +03:00
commit 0635841dc9

View File

@ -49,21 +49,15 @@ TEST(Processors, PortsNotConnected)
processors.emplace_back(std::move(source));
processors.emplace_back(std::move(sink));
auto exec = [&]()
{
try
{
PipelineExecutor executor(processors);
executor.execute(1);
ASSERT_TRUE(false) << "Should have thrown.";
}
catch (DB::Exception & e)
{
std::cout << e.displayText() << std::endl;
ASSERT_TRUE(e.displayText().find("pipeline") != std::string::npos);
throw;
ASSERT_TRUE(e.displayText().find("pipeline") != std::string::npos) << "Expected 'pipeline', got: " << e.displayText();
}
};
ASSERT_THROW(exec(), DB::Exception);
}