Kaydet (Commit) 4917f0ce authored tarafından Matúš Kukan's avatar Matúš Kukan

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
üst c563ca38
...@@ -107,9 +107,18 @@ static gboolean timed_out( void * ) ...@@ -107,9 +107,18 @@ static gboolean timed_out( void * )
void TestTeleTubes::testInitialize() void TestTeleTubes::testInitialize()
{ {
utl::LocalFileHelper::ConvertPhysicalNameToURL( g_timeout_add_seconds (10, timed_out, NULL);
OUString::createFromAscii( getenv("SRCDIR") ) + "/tubes/qa/test-config.ini", try
maTestConfigIniURL ); {
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 ); rtl::Bootstrap aTestConfig( maTestConfigIniURL );
TeleManager::addSuffixToNames( "TeleTest"); TeleManager::addSuffixToNames( "TeleTest");
...@@ -124,7 +133,6 @@ void TestTeleTubes::testInitialize() ...@@ -124,7 +133,6 @@ void TestTeleTubes::testInitialize()
aTestConfig.getFrom("accepter", aAccepterIdentifier)); aTestConfig.getFrom("accepter", aAccepterIdentifier));
maAccepterIdentifier = OUStringToOString( aAccepterIdentifier, RTL_TEXTENCODING_UTF8); maAccepterIdentifier = OUStringToOString( aAccepterIdentifier, RTL_TEXTENCODING_UTF8);
g_timeout_add_seconds (10, timed_out, NULL);
mpCollaboration1 = new TestCollaboration(); mpCollaboration1 = new TestCollaboration();
mpCollaboration2 = new TestCollaboration(); mpCollaboration2 = new TestCollaboration();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment