I'm trying to fix this as discussed in IRC, that is respawning the D-Bus test connection (and related mock services) at every test, and having a longer timeout.
However I'm getting a crash when calling startServices():
The crash seems to happen after one Accounts::Manager object has been created, and must be related to D-Bus: if I comment out all "new Accounts::Manager()" from the tests or if I add the Accounts::Manager::DisableNotifications option to the Accounts::Manager constructor (which effectively disables any usage of D-Bus in the library), I don't get any crash when invoking startServices() in later tests.
I'm still trying to understand why this happens. Note that libaccounts-qt doesn't use D-Bus itself: it wraps libaccounts-glib, which calls
I'm trying to fix this as discussed in IRC, that is respawning the D-Bus test connection (and related mock services) at every test, and having a longer timeout.
However I'm getting a crash when calling startServices():
http:// paste.ubuntu. com/20160205/
The crash seems to happen after one Accounts::Manager object has been created, and must be related to D-Bus: if I comment out all "new Accounts: :Manager( )" from the tests or if I add the Accounts: :Manager: :DisableNotific ations option to the Accounts::Manager constructor (which effectively disables any usage of D-Bus in the library), I don't get any crash when invoking startServices() in later tests.
I'm still trying to understand why this happens. Note that libaccounts-qt doesn't use D-Bus itself: it wraps libaccounts-glib, which calls
g_bus_get_sync (G_BUS_ TYPE_SESSION, NULL, &error_int);
This must return the right thing, as the testAccountChan ges() test works fine itself -- it just causes any startServices() invoked afterwards to fail.
Will continue investigating...