On 15/07/11 12:58, Patrick Ohly wrote:
On Fr, 2011-07-15 at 12:44 +0100, Andy Gould wrote:
On 15/07/11 11:42, Patrick Ohly wrote:
On Fr, 2011-07-15 at 11:21 +0100, Andy Gould wrote:
On 11/07/11 17:20, Patrick Ohly wrote:
commit 6300b3ea9184e114b521ef2e5eafda476c836e5c
Author: Patrick Ohly<[email protected]>
Date: Mon Jul 11 14:40:06 2011 +0200
SyncEvolution: fixed change tracking in testing
When testing with "Client::Source::*::testChanges", two different
accounts must be used. Otherwise the two simulated SyncEvolution
clients share the same sync keys and testing fails.
The solution is to switch to a different account, derived by appending
_B to the original account ID, for the second client.
...
--- a/syncevolution/ActiveSyncSourceRegister.cpp
+++ b/syncevolution/ActiveSyncSourceRegister.cpp
@@ -133,6 +133,17 @@ static TestingSyncSource *createEASSource(const
ClientTestConfig::createsource_t
ClientTest&client, int source,
bool isSourceA)
{
TestingSyncSource *res = create(client, source, isSourceA);
+
+ // Mangle username: if the base username in the config is account
+ // "foo", then source B uses "foo_B", because otherwise it'll end
+ // up sharing change tracking with source A.
+ if (!isSourceA) {
+ ActiveSyncSource *eassource = static_cast<ActiveSyncSource *>(res);
+ std::string account = eassource->getSyncConfig().getSyncUsername();
+ account += "_B";
+ eassource->getSyncConfig().setSyncUsername(account, true);
+ }
+
Where are you seeing the tests using the same activesyncd account when
they should be using different ones?
Hi Patrick,
I may have misunderstood the point of the 2 activsyncd accounts ( Foo,
and Foo_B in gconf) - can you clarify for me.... should they point to
different Exchange accounts ( [email protected] and
[email protected]) - or the same one?
The same one, but with different device IDs.
So if you configure target-config@client-test with username=Foo, then
you need accounts called "Foo" and "Foo_B" in gconf. Both must have the
same username/password/URL. But because they are different local
accounts, my expectation is that activesyncd treats them completely
separate and thus assigns different device IDs. To the Exchange servers
this should look like two devices who happen to contact it with the same
IP address.
yeah, thats what I thought unfortunately, your assumption about the way
that the accounts are handled was not correct. At the moment, the
device id is exactly that - fixed for the device, so I needed to
allocate account level ids instead, I have done that - but they are not
being used, because the daemon is too clever for its own good - and
recognises that the 2nd account is actually pointing at the same
Exchange account, and grabs the existing connection for it. One more
modification, and hopefully that will sort it.... getting there slowly.
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution