Re: [Evolution-hackers] Isolated unit test status report



On Sun, 2013-02-24 at 20:54 -0500, Matthew Barnes wrote:
On Sat, 2013-02-23 at 23:38 +0900, Tristan wrote:
This indicates that somewhere, in the client or server, we
are leaking references to the GDBusConnections. I've tested
this in raw GIO (and added a test case there) to ensure it
is indeed possible to stop/start the GTestDBus between tests,
the problem is clearly an ugly bug to be fixed in EDS.

I suspect this might be related to the factory proxy object that we
create in the background and leave lying around as a global variable.

We could try letting EBookClient create its own EDBusAddressBookFactory
proxy, call its OpenAddressBook method, and then immediately destroy it.

That would simplify the code, eliminate the global variable, and quite
possibly fix the GDBusConnection leak (if my guess is right).

I'll prototype this for 3.9.  I think I've pulled enough D-Bus stunts
for one release already.


This is due to a race condition in e_client_remove_sync(),
this call is made at the end of a test case.. which results
in the ESource being removed from the ESourceRegistry server.

What happens when the cache-reaper module is loaded, is that
the 'test-address-book' source is removed /some time after/
e_client_remove_sync() completes... sometimes this happens
right in the middle of the following test case.

Probably another side effect of (A).

In the interim, it might help if the ESource's unique ID were actually
unique for each test case, instead of a static ID for all cases.

Instead of "test-address-book" use "test-address-book-N" where 'N' is
the test case number or some other increasing integer.

I had been trying to avoid that since the beginning ;-)

But... for now let's roll with that until we can fix the other issues.

I've made some fixes and now test cases are working much better
with the workarounds in place. I think the final touch will be
to run the module-prompter test relocated and then make check
will be completely passing again.

I've made four relevant commits, two of them touch outside
the test casing fixture and simply add environment variable
support to allow relocation of various loaded modules (and
this fixes the breakage that is only noticeable where EDS
has _never_ been installed, i.e. regarding missing module
directories in ${prefix}/lib/evolution-data-server).

commits listed below.

Cheers,
       -Tristan

commit 04906b9b666b14b30667e7180ac1ae17e5258258
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Feb 25 19:35:20 2013 +0900

test-client-view-operations.c: Now test both direct access and indirect
access
    
This works properly now since we fixed (or worked around) issues in the
test fixtures. Since we use a separate ESource UID (sandbox) for each
test case this now works properly.

commit 79041f15c816c7f7b9ad90657c928da94e245e6c
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Feb 25 19:33:04 2013 +0900

Some changes to the isolated test fixture
    
 a.) Setup EDS_REGISTRY_MODULES to use the local cache-reaper module
 b.) Setup EDS_CAMEL_PROVIDER_DIR to use the local provider
 c.) Added "source_name" and use separate ESource uids between tests,
     each test in the suite uses a separate ESource name
    
Note that 'c' is a stop-gap solution to the problem of not being able to
properly shut-down the whole test D-Bus environment between tests, it
should be removed once we can address that problem.

commit 85afb581c3e5253e77c906c175a93dee5f7705b3
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Feb 25 19:28:04 2013 +0900

Make the Camel provider modules relocatable
    
This simply adds an environment variable allowing us to load the local
provider from a relocated location in the case we run 'make check'
without installing (this avoids some warnings and helps to isolate the
test environment).

commit 410a56cd3fd1793f6c523e416f2d73c4baf2fc05
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Feb 25 19:26:45 2013 +0900

Make the ESourceRegistryServer modules relocatable like addressbook &
calendar
    
This simply adds an environment variable allowing us to load registry
modules from a relocated location in the case we run 'make check'
without installing (also ensuring that we test the not-yet-installed
environment properly).




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]