fix CppunitTest_dbaccess_SingleSelectQueryComposer_test deadlock
I have seen several deadlocks on jenkins in this unit test, normally with stacks like privateSnippetExecutor () connectivity::hsqldb::OHsqlConnection::flush() connectivity::hsqldb::ODriverDelegator::flushConnections() connectivity::hsqldb::OConnectionController::queryTermination framework::Desktop::impl_sendQueryTerminationEvent framework::Desktop::terminate() (anonymous namespace)::Hook::deinitHook((anonymous namespace)::Hook*, LinkParamNone*) (anonymous namespace)::Hook::LinkStubdeinitHook(void*, LinkParamNone*) Link<LinkParamNone*, void>::Call(LinkParamNone*) const in DeInitVCL() Implement a proper teardown in the unit test so this does not happen. Change-Id: I3242752dc38d74128fcd134fe7391f04bd64ebc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -41,6 +41,7 @@ class SingleSelectQueryComposerTest : public DBTestBase
|
||||
|
||||
public:
|
||||
virtual void setUp() override;
|
||||
virtual void tearDown() override;
|
||||
void testSetCommand();
|
||||
void testAttributes();
|
||||
void testSubQueries();
|
||||
@@ -83,6 +84,17 @@ void SingleSelectQueryComposerTest::setUp()
|
||||
m_xComposer = xComposer;
|
||||
}
|
||||
|
||||
void SingleSelectQueryComposerTest::tearDown()
|
||||
{
|
||||
m_xComposer.clear();
|
||||
if (m_xConnection)
|
||||
{
|
||||
m_xConnection->close();
|
||||
m_xConnection.clear();
|
||||
}
|
||||
DBTestBase::tearDown();
|
||||
}
|
||||
|
||||
// tests setCommand of the composer
|
||||
|
||||
void SingleSelectQueryComposerTest::testSetCommand()
|
||||
|
||||
Reference in New Issue
Block a user