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:
On Fr, 2011-07-08 at 18:09 +0200, Patrick Ohly wrote:
Is suspect that part of the problem is that Client::eas_event::Source
needs to "simulate" access by two different clients. Both use the
ActiveSync account defined by
    ~/.config/syncevolution/client-test/peers/target-config/config.ini
so essentially this looks to the Exchange server like one client.
I fixed this with the following commit:

commit 6300b3ea9184e114b521ef2e5eafda476c836e5c
Author: Patrick Ohly<[email protected]>
Date:   Mon Jul 11 14:40:06 2011 +0200


Hi Patrick,
   Having fixed the duplicating issue, I'm still seeing invalid sync
keys, but I think this is a problem in how the tests are trying to
work... from the point of view of the Exchange server, this is still
looking like one client, because it uses a device id, and the username (
the activesync account id is only a local identifier)... I'm going to
try account level faked device ids for the purposes of testing, and see
if that works..
I thought I had addressed that with this commit:

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?

  thanks,

   Andy

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

Reply via email to