From 4917f0ceb2a7b1bb3ba878373f71f38d156278af Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Thu, 27 Sep 2012 22:07:53 +0200 Subject: tubes: catch exception to get more info Also add timeout as a first thing to not loop forever if something else goes wrong. Change-Id: I3c752f74bfd32c1a0a6d1ce85408271a530fb379 --- tubes/qa/test_manager.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tubes') diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx index 545947de159e..2ccbe329ef34 100644 --- a/tubes/qa/test_manager.cxx +++ b/tubes/qa/test_manager.cxx @@ -107,9 +107,18 @@ static gboolean timed_out( void * ) void TestTeleTubes::testInitialize() { - utl::LocalFileHelper::ConvertPhysicalNameToURL( - OUString::createFromAscii( getenv("SRCDIR") ) + "/tubes/qa/test-config.ini", - maTestConfigIniURL ); + g_timeout_add_seconds (10, timed_out, NULL); + try + { + utl::LocalFileHelper::ConvertPhysicalNameToURL( + OUString::createFromAscii( getenv("SRCDIR") ) + "/tubes/qa/test-config.ini", + maTestConfigIniURL ); + } + catch (const com::sun::star::uno::Exception& e) + { + CPPUNIT_ASSERT_MESSAGE( OUStringToOString( "Exception while getting config.ini url: " + + e.Message, RTL_TEXTENCODING_UTF8).getStr(), false); + } rtl::Bootstrap aTestConfig( maTestConfigIniURL ); TeleManager::addSuffixToNames( "TeleTest"); @@ -124,7 +133,6 @@ void TestTeleTubes::testInitialize() aTestConfig.getFrom("accepter", aAccepterIdentifier)); maAccepterIdentifier = OUStringToOString( aAccepterIdentifier, RTL_TEXTENCODING_UTF8); - g_timeout_add_seconds (10, timed_out, NULL); mpCollaboration1 = new TestCollaboration(); mpCollaboration2 = new TestCollaboration(); } -- cgit