summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-30 15:41:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-30 15:54:59 +0200
commit4bd5d16381442fc94b6beecd6c16dd15686be924 (patch)
treee4d9e761a90a9938729c5e0f844e5f379cf71727 /connectivity
parent6b50e21473e7d2b24b5c609d8a1c31f27644d842 (diff)
Fix leaks in test code
Change-Id: I435fcfd6d10875565b543ea76fa8bfbf52e5f5d0
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/qa/connectivity/mork/DriverTest.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/connectivity/qa/connectivity/mork/DriverTest.cxx b/connectivity/qa/connectivity/mork/DriverTest.cxx
index ea0164989481..39d45b4fe077 100644
--- a/connectivity/qa/connectivity/mork/DriverTest.cxx
+++ b/connectivity/qa/connectivity/mork/DriverTest.cxx
@@ -97,6 +97,7 @@ void MorkDriverTest::tearDown()
{
// how to make dispose() work?
// Reference< com::sun::star::lang::XComponent >( m_xMorkComponent, UNO_QUERY_THROW )->dispose();
+ m_xConnection->close();
test::BootstrapFixture::tearDown();
}
@@ -159,6 +160,9 @@ void MorkDriverTest::test_select_default_all()
CPPUNIT_ASSERT_MESSAGE("fetch last row failed!", result);
mail = xDelegatorRow->getString(1);
CPPUNIT_ASSERT_MESSAGE("last row is not john@doe9.org!", mail.equalsAscii("john@doe9.org"));
+
+ css::uno::Reference<css::sdbc::XCloseable>(
+ xStatement, css::uno::UNO_QUERY_THROW)->close();
}
void MorkDriverTest::test_select_list_table_joe_doe_5()
@@ -186,6 +190,9 @@ void MorkDriverTest::test_select_list_table_joe_doe_5()
CPPUNIT_ASSERT_MESSAGE("fetch first row failed!", result);
OUString mail = xDelegatorRow->getString(1);
CPPUNIT_ASSERT_MESSAGE("last row is not john@doe5.org!", mail.equalsAscii("john@doe5.org"));
+
+ css::uno::Reference<css::sdbc::XCloseable>(
+ xStatement, css::uno::UNO_QUERY_THROW)->close();
}
CPPUNIT_TEST_SUITE_REGISTRATION(MorkDriverTest);