Patrick Ohly
de2cc3c0f5
testing: re-enabled SyncReport and checking it
2009-03-25 14:43:38 +01:00
Patrick Ohly
8e9512cd20
testing: fixed log handling during Client::Sync
...
The logdir is now overridden so that all files (client.log, message
dumps, Synthesis logs) are written in a subdirectory names after
the current test. A <test>.log file captures all output written
outside of the sync itself.
2009-03-25 14:43:37 +01:00
Patrick Ohly
41aaec7eb2
testing: compiles and runs again, but output redirection is not working yet
2009-03-25 14:43:36 +01:00
Patrick Ohly
fcbf8c72aa
interrupted sync tests: added comparison against reference files
2009-03-25 14:43:32 +01:00
Patrick Ohly
1170ba8b38
ClientTest: better infrastructure for data file comparisons
...
File names now only contain a single underscore instead of
multiple ones. The compare functions can be called so that they
return the result instead of throwing an assertion (useful for
doing multiple comparisons and then checking the result).
The synccompare Perl script is told to print the file names
that it is comparing.
2009-03-25 14:43:31 +01:00
Patrick Ohly
c5900a63a1
interrupted sync testing: completed the set of changes that can be applied to client and server
2009-03-25 14:43:31 +01:00
Patrick Ohly
c74a620257
ClientTest: infrastructure for removing and updating specific items
2009-03-25 14:43:31 +01:00
Patrick Ohly
69d5dc588b
interrupted sync testing: maxmsgsize == 1 indicates that caller wants to interrupt while receiving server's reply
...
The Curl transport agent sets a very low segment and receive
buffer size so that the server cannot send more data than the client
is going to accept.
2009-03-25 14:43:31 +01:00
Patrick Ohly
bda97ea2b6
interrupted sync testing: added CLIENT_TEST_INTERRUPT_AT to select where to interrupt
...
Set the CLIENT_TEST_INTERRUPT_AT env variable to a message number
>= 0 to execute one uninterrupted run and then interrupt at that
message.
2009-03-25 14:43:30 +01:00
Patrick Ohly
beb9d7887f
ClientTest: test resuming a synchronization after a disconnect
...
Works for different situations (client has changes, server has
changes, both have changes) as well as for disconnects after every
single message in the synchronization. Uses the same infrastructure
as the other Client::Sync tests and therefore can be used to test
normal clients.
Only adding new items on client or server is currently implemented:
Client::Sync::vcard21::Retry::testInterruptResumeServerAdd
Client::Sync::vcard21::Retry::testInterruptResumeClientAdd
Results are not yet compared against outcome of uninterrupted
sync.
2009-03-25 14:43:30 +01:00
Patrick Ohly
3489ad43af
testing: allow accumulating log prefixes dynamically
2009-03-25 14:43:30 +01:00
Patrick Ohly
6869110b3d
testing: enhanced infrastructure (LUIDs)
...
Changed the utility functions so that they pass around and use
LUIDs. This allows building more complex tests which need to
modify specific items.
2009-03-25 14:43:30 +01:00
Patrick Ohly
807c835ccf
tests: split big test into smaller ones
...
This helps g++ to complete compilation without requiring huge amount of memory.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@26637 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
c344d25d8d
fixed some (incorrect) gcc warnings about uninitialized vars, relaxed semantic checks in testLinkedItems
...
In testLinkedItems the SyncSource is now allowed to list a linked item as update
when the peer item (parent of child or child of parent) is
deleted/modified/added in the wrong order.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@25760 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
22101a83d0
fixed detached event testing (ical20)
...
- the parent events accidentally had a RECURRENCE-ID, which turned them into
specific instances
- clarified that some of the tests are too strict: child items without a parent
are problematic and not necessarily supported by client (Evolution) and server
(ScheduleWorld) => these tests can be disabled via -DLINKED_ITEMS_RELAXED_SEMANTIC=0
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@25438 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
577124efe3
use SyncSource::removeAllItems() instead of loop + deleteItem()
...
There are two reasons for this change:
- the new API call would not be covered otherwise
- it is required for testing detached recurrences, because sources
might be forced to delete children together with the parent;
this caused the loop to fail prematurely
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@25437 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:28 +01:00
Patrick Ohly
7bcb8f00ca
ical20: added testing of detached recurrences
...
Two VEVENTs were added to ical20.ics where one represents
the main event with recurrence rule and the other an exception
from the meeting series.
The new Sync::Source::ical20::testLinkedItems test covers
various different operations involving such two related VEVENTs
(adding in arbitrary order, updating/deleting one or both events, etc.).
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@24122 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:28 +01:00
Patrick Ohly
c85b4349ae
extended Sync::testRefreshSemantic: a two-way sync after a refresh-from-server should not transmit any changes
...
Problematic in this case might be items deleted by the client automatically
during the refresh-from-server.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@22365 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:27 +01:00
Patrick Ohly
6e5f9a8e70
added obligatory endSync() calls: found when testing SyncEvolution's TrackingSyncSource whereas other sources happened to work without them
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@22133 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:26 +01:00
Patrick Ohly
33c7ad7b44
extended LocalTests::testChanges and run SyncTests::testManyItems with message size limit
...
LocalTests::testChanges() now also checks some more sequences of add/update and add/delete/add.
SyncTests::testManyItems() can generate large messages, which fails with the Synthesis
server because it expects clients to obey the message size limit. Run test with fixed,
small enough limit as workaround.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/branches/b_v65/3x/client-api/native@21859 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:26 +01:00
Andrea Toccalini
90eb9f7132
updated license to AGPL
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/branches/b_v65/3x/client-api/native@21417 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:25 +01:00
Patrick Ohly
8fb9355a7e
During the transition from SyncEvolution to the C++ client library the NUM_ITEMS setting got lost: all tests which create a configurable amount of items (Source::testManyChanges, Sync::testManyItems) unintentionally ran with zero items, i.e. didn't actually test anything.
...
Added and documented CLIENT_TEST_NUM_ITEMS which controls the number
of items to create.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/branches/b_v65/3x/client-api/native@20692 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:25 +01:00
Patrick Ohly
2297a2b96b
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
2009-03-25 14:43:24 +01:00
Patrick Ohly
73eff8c05e
make update() utility function a bit more flexible: the checking stage is optional now
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17611 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:24 +01:00
Patrick Ohly
5c94e26be3
separate patch to fix indention
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17603 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:24 +01:00
Patrick Ohly
3f95bf1734
made it possible for clients to not just configure existing tests, but also add their own ones
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17602 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:24 +01:00
Matteo Vitolo
66e4de9766
copyright updated
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17292 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:23 +01:00
Patrick Ohly
76ee31b70b
avoid patching FALSE/TRUE in test suite sources when installing them: the same words also occur in the test data strings embedded in the source code and patching those is incorrect
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16774 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:22 +01:00
Patrick Ohly
02d377d5dc
client-test Client::Sync did not execute the tests with more than once source because the tests were registered in two different nodes, both called Client::Sync - CPPUnit does not seem to handle that; fixed by keeping the node name unique
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16344 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:22 +01:00
Patrick Ohly
465d9b2861
insert additional lines after the first line of VJOURNAL because it might be used as the summary and thus should not be modified
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16228 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:22 +01:00
Patrick Ohly
a89e99adfb
A little bit more sane datatype handling of items inserted by test frame work: the type is empty in insert() and update() now and "raw" in importItem(). The "raw" type is historical and it might be possible to remove it.
...
A really clean solution would make the mime type of test data
configurable and use that during all imports/updates.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16227 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:22 +01:00
Patrick Ohly
1d3ad69168
the check for vCard 2.1 was not correct and always enabled quoted-printable encoding
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16153 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:21 +01:00
Patrick Ohly
cf166e4717
deleteAll() did not always work because the initial sync was TWO_WAY and not SLOW
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16010 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:21 +01:00
Patrick Ohly
f3d7fe1733
pass the sync result to CheckSyncReport so that it can be taken into account when checking the result
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@15792 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:20 +01:00
Patrick Ohly
02333c6b39
first draft of API documentation via Doxygen
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@15371 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
b97d0be337
fixed compilation if --enable-unit-tests is used without --enable-integration-tests
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14903 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
c20be8c554
moved common code for printing a SyncReport into the SyncReport class itself
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14846 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
2f69d6ba94
- added checking of the SyncReport - changed expectations for refresh-from-server sync: number of deleted items depends on SyncSource implementation and cannot be checked - make LOCATION unique in calendar events to avoid having events merged by Funambol server
...
=> testing passed with Funambol 3.0 using:
CLIENT_TEST_DELAY=5 \
CLIENT_TEST_LOG=/scratch/Funambol/ds-server/logs/funambol_ds.log \
CLIENT_TEST_SOURCES=vcal10,vcard21 \
CLIENT_TEST_SERVER=funambol \
./client-test Client::Sync::vcal10_vcard21
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14292 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
cca9cd3c13
- added vcard21/vcal10 for Funambol 3.0 server - server URI is now set automatically when creating client config; works for vcard21/vcal10 with Funambol 3.0 and vcard30/ical20 with ScheduleWorld
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14183 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:18 +01:00
Patrick Ohly
1b0a313b8b
added syncing of many sources at once (still to be tested)
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14153 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:17 +01:00
Patrick Ohly
9647e7c2b7
solved Windows compile problems
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12373 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:17 +01:00
Patrick Ohly
f89bdcb76f
sync tests now work on Linux: - implemented sync() method using FILESyncSource - clarified naming of clients and different change tracking
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12301 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:17 +01:00
Patrick Ohly
1b3801011f
Implemented change tracking in FILESyncSource. Fixed some portability problems (e.g. %ls with char parameter), ensured that everything still compiles on Windows. RawFILESyncSource now passes all local source tests on Linux, but syncing is still not implemented.
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12097 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:17 +01:00
Patrick Ohly
a3137b52e7
Added real sync testing, using RawFILESyncSource to store items locally. Compiles and runs on Linux, but tests mostly fail because FILESyncSource supports no change tracking yet.
...
See test/client-test.cpp as an example how the existing tests can
be hooked up with other SyncSource implementations. The sync() function
still needs to be implemented.
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12093 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:16 +01:00
Patrick Ohly
ccedc74a64
finished porting all tests from SyncEvolution test suite, improved log file handling
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11864 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:16 +01:00
Patrick Ohly
9432e753c2
fixed formatting slightly, added real sync tests
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11840 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:16 +01:00
Patrick Ohly
ff6dc24714
finished local tests
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11805 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:15 +01:00
Patrick Ohly
768464c846
added a C++ client test framework, moved test runner to new 'test' directory
...
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11726 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:15 +01:00
Patrick Ohly
04a2d94c4a
tests: removed in preparation for importing complete history
...
The branch 'Funambol' contains code developed by Patrick
Ohly in the Funambol Subversion repository and contributed
to Funambol as part of the Funambol Contributor Agreement.
It will be merged back into the SyncEvolution repository,
which is allowed by that agreement because
Funambol grants to you [the contributor] a non-exclusive, perpetual, irrevocable, worldwide, royalty free,
transferable copyright license to reproduce, prepare derivative works of, distribute
(internally and externally, in object code and, if included in Your Contributions, source
code form), use, publicly perform and publicly display Your Contributions, with the right
to sublicense all of these rights through multiple tiers of sublicensees.
2009-03-12 17:10:48 +01:00
Patrick Ohly
3b88d491c8
enable those linked item tests that 'dumb' sources can pass
...
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@735 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-18 20:31:37 +00:00
Patrick Ohly
276eccf910
testLinkedItemsInsertBothUpdateParent: updating parent may also update child
...
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@722 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 07:37:25 +00:00
Patrick Ohly
d4cd8002ce
calendar synchronization with Evolution Exchange Connector works again
...
CALOBJ_MOD_THIS for parent items caused problems. A *long* delay after
a sync was needed, otherwise the Connector returned garbage during
further accesses (e.g., old child event instead of the updated one).
Some code cleanup (creating ItemID from LUID).
Temporarily forked the client test (introduced update items for child/parent,
relaxed semantic selectable at runtime).
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@719 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 07:34:17 +00:00
Patrick Ohly
58a96aa60d
copied r_v70ga from C++ client lib because some changes will be necessary
...
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@718 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 07:31:55 +00:00
Patrick Ohly
a121171404
# pushed sources back into SyncML client library
...
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@431 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-23 21:20:18 +00:00
Patrick Ohly
f4d33fd972
temporary fork of 1.25: handle testComplexUpdate where some (but not all) sources have a complex update item
...
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@408 15ad00c4-1369-45f4-8270-35d70d36bdcd
2007-10-12 18:02:42 +00:00