The ComplexUpdate test failed when multiple sync sources were active, but only some had a complex item to update with. Now the simple update item is used for those sources.

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@20309 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
This commit is contained in:
Patrick Ohly 2007-10-23 21:11:38 +00:00
parent 73eff8c05e
commit 2297a2b96b

View file

@ -958,7 +958,14 @@ void SyncTests::testComplexUpdate() {
source_it it;
for (it = sources.begin(); it != sources.end(); ++it) {
it->second->update(it->second->createSourceA, it->second->config.complexUpdateItem);
it->second->update(it->second->createSourceA,
/* this test might get executed with some sources which have
a complex update item while others don't: use the normal update item
for them or even just the same item */
it->second->config.complexUpdateItem ? it->second->config.complexUpdateItem :
it->second->config.updateItem ? it->second->config.updateItem :
it->second->config.insertItem
);
}
sync(SYNC_TWO_WAY, ".update", CheckSyncReport(0,0,0, 0,1,0));