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.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to