virtual void TearDown() override {
if (omxNode != nullptr) {
+ // If you have encountered a fatal failure, it is possible that
+ // freeNode() will not go through. Instead of hanging the app.
+ // let it pass through and report errors
+ if (::testing::Test::HasFatalFailure()) return;
EXPECT_TRUE((omxNode->freeNode()).isOk());
omxNode = nullptr;
}