| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/84
|
| |
|
|
|
|
| |
The `g_assert()` can be disabled by `G_DISABLE_ASSERT` when compiling,
which is not desired for the unit tests, thus use the `g_assert_true()`
in the tests instead.
|
| |
|
|
| |
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/72
|
| |
|
|
|
|
|
| |
Let it use the global main loop, to avoid stale GSource-s being
lost in the private context scheduled by GDBus, which could cause
a crash due to the GDBusConnection not being finalized at the end
of the test.
|
| |
|
|
|
|
|
|
| |
This broke with commit 0394a3bd9cd0b0cbf3a9bc1eac70f5a4849f6df6 for the file
backend, because the EContact's e_contact_inline_local_photos() could not
decipher the original MIME type from the file extension.
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/309
|
| |
|
|
| |
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/282
|
| |
|
|
|
|
|
| |
Even with the previous commit there still could happen some issue
with D-Bus property change notifications, thus add a workaround to
the related book and calendar tests, because it's not a problem
on the evolution-data-server side, but somewhere deeper.
|
| |
|
|
|
| |
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/83
and https://gitlab.gnome.org/GNOME/evolution-data-server/issues/85
|
| |
|
|
|
|
|
|
|
|
|
| |
notification
The test had been mostly working, except cases when the delivery
of a D-Bus property change signal had been delayed. Then the value
on the client side was not the same as the value on the server side.
There's a very similar test for EBookClient, which does slightly more
things, which gives D-Bus enough time to deliver the property change
to the client, thus this change adds the component removal to address it.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Let's have it as it's common to be, which means top level src/ for
sources, single data/ for data, and so on.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Couple related changes:
a) no need to wait for a connected state in tests, it only makes thing slower
b) have larger interval for finalize wait
c) avoid memory leak (and test failure) in test-book-client-view-operations
d) update ko_KR alphabet in test-book-client-cursor-operations
e) skip test-book-client-cursor-operations from 'make check', due it being too slow
|
| |
|
|
|
|
| |
Since this change the client is responsible to provide credentials
to use to authenticate backends (through ESource-s, to be more precise),
unless the credentials are already saved.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[00:21] <tristan> dwmw2, if you really think that, then it will have to be
rethought again, but if we're gonna rethink it again - please
add a failing test case to test-client-custom-summary.c before
we even go down that road.
Here you go :)
Note: This fails because we're using an inner join of folder_id with
folder_id_email_list on uid. Which means that records in folder_id
which don't *have* an email address aren't considered for the search.
This is the query:
SELECT DISTINCT summary.uid, summary.vcard, summary.bdata
FROM 'folder_id' AS summary
JOIN 'folder_id_email_list' AS email_list
ON +email_list.uid = summary.uid
WHERE ((summary.nickname IS NOT NULL AND summary.nickname LIKE 'p%')
OR (email_list.value IS NOT NULL AND email_list.value LIKE 'p%')
OR ((summary.full_name IS NOT NULL AND summary.full_name LIKE 'p%')
OR (summary.family_name IS NOT NULL AND summary.family_name LIKE 'p%')
OR (summary.given_name IS NOT NULL AND summary.given_name LIKE 'p%')
OR (summary.nickname IS NOT NULL AND summary.nickname LIKE 'p%'))
OR (summary.file_as IS NOT NULL AND summary.file_as LIKE 'p%'));
You actually need a LEFT OUTER JOIN there, if you're going to do it that
way.
The above query takes about 1350ms on my data set with 238121 records.
If I change it to a LEFT OUTER JOIN, it looks like it will literally
take hours, so I didn't let it finish. I'm not sure what the '+' sign
in 'ON +email_list.uid = summary.uid' is supposed to do, but if I
*remove* that to make it 'LEFT OUTER JOIN … ON email_list.uid = summary.uid'
the query then completes in about 1650ms.
I can improve that by restructuring the query to look like this:
SELECT DISTINCT summary.uid, summary.vcard, summary.bdata
FROM 'folder_id' AS summary
JOIN 'folder_id_email_list' AS email_list
ON +email_list.uid = summary.uid
WHERE (email_list.value IS NOT NULL AND email_list.value LIKE 'p%')
UNION
SELECT summary.uid, summary.vcard, summary.bdata
FROM 'folder_id' AS summary
WHERE ((summary.nickname IS NOT NULL AND summary.nickname LIKE 'p%')
OR ((summary.full_name IS NOT NULL AND summary.full_name LIKE 'p%')
OR (summary.family_name IS NOT NULL AND summary.family_name LIKE 'p%')
OR (summary.given_name IS NOT NULL AND summary.given_name LIKE 'p%')
OR (summary.nickname IS NOT NULL AND summary.nickname LIKE 'p%'))
OR (summary.file_as IS NOT NULL AND summary.file_as LIKE 'p%'));
That runs in about 460ms on my data set.
I can get it down to about 400ms by eliding some of the IS NOT NULL checks
that seem rather gratuitous (although shouldn't sqlite do that for itself
since it's a fairly bloody obvious optimisation?):
SELECT DISTINCT summary.uid, summary.vcard, summary.bdata
FROM 'folder_id' AS summary
JOIN 'folder_id_email_list' AS email_list
ON +email_list.uid = summary.uid
WHERE (email_list.value LIKE 'p%')
UNION
SELECT summary.uid, summary.vcard, summary.bdata
FROM 'folder_id' AS summary
WHERE ((summary.nickname LIKE 'p%')
OR (summary.full_name LIKE 'p%')
OR (summary.family_name LIKE 'p%')
OR (summary.given_name LIKE 'p%')
OR (summary.nickname LIKE 'p%')
OR (summary.file_as LIKE 'p%'));
Finally, if I actually add indices on the fields that need them, such as
file_as, nickname, etc., I can get the search time down to 5-10ms. This
*only* works for my refactored queries using 'UNION', and not for the JOIN
versions. Obviously the indices aren't useful on the results of the JOIN.
(Note: we did already have an index on file_as_localized, but not file_as.
And likewise for some other fields).
|
| |
|
|
| |
... for email and X509 certificates.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I also added license information to source files where it was
missing and changed the way the license block is organized. All
the sources' license information comments follow the same pattern:
/* [ Optional short file description ]
*
* [ Optional copyright notices]
*
* License information block
*
* [ Optional 'Authors:' section ]
*/
The LGPL is references consistently now; source files with main()
function, like tests or D-Bus services, use 'program' in the license
information block, while the other sources use 'library' word.
|
| | |
|
| | |
|
| |
|
|
| |
Avoid naming conflicts when installing tests into ${pkglibexecdir}/installed-tests
|
| |
|
|
|
| |
Also, load the vcards from ${pkglibexecdir}/installed-tests/vcards
in the case that TEST_INSTALLED_SERVICES is specified
|
| |
|
|
|
| |
This commit adds the usage of EDS_INSTALLED_TESTS and a few lines
to all the test directories which can run installed.
|
| |
|
|
| |
No search expression is invalid anymore.
|
| |
|
|
|
|
| |
special case
x-evolution-any-field with a NULL value (or byte) means 'get all contacts'.
|
| |
|
|
| |
There is no such thing anymore as an invalid query for the cursor.
|
| |
|
|
|
|
|
|
| |
Now we aren't filtering by fields of interest for contact changes,
so disabled the part of the test which adds a contact.
This can be reverted if we so decide to filter it manually
in EDataBookView
|
| |
|
|
|
|
| |
Initial changes are filtered by fields-of-interest, however
change notifications are not filtered, this is because it's actually
faster to just send the vcard as is.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Added test for the underscore
Before we used to only escape the '%' character in LIKE statements,
but SQLite also recognizes the '_' as a single char wildcard and
needs escaping.
This test ensures that the underscore is properly handled.
o Added query test which ORs the same field
This helps to test the query optimizer in EBookBackendSqlite, which
will optimize a query which ORs two multi attribute fields (like
E_CONTACT_EMAIL).
o Added tests for the NOT queries
o Added tests for NOT, AND and OR and as well as some nested AND / OR
tests which trigger the query optimizer in EBookBackendSqlite
o Fix expectations for phone number matches, now that the phone number
comparisons are fixed
o Added --filter option.
Pass a regular expression to filter which test cases should run
o Added test which searches by UID (can trigger bugs if normalization
is mistakenly done on the UIDs).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Now test the cursor functionality in cases where the cursor
is using sort fields not in the summary (and search expressions
not in the summary).
Also added --filter option, pass a regular expression to filter
which test cases should run
Also increased TIMEOUT tollerance. This needs fixing, backends are not
shutting down properly, locale changes get backed up and take more and
more time as the test keeps running.
|
| | |
|
| |
|
|
|
| |
- Remove trailing tabs.
- Add terminators to multi-line lists.
|
| |
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=712244
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes the code free of Coverity scan issues, except of the doc/
folder. It is sometimes quite pedantic and expects/suggests some
coding habits, thus certain changes may look weird, but for a good
thing, I hope. The code is also tagged with Coverity scan
suppressions, to keep the code as is and hide the warning too.
Also note that Coverity treats g_return_if_fail(), g_assert() and
similar macros as unreliable, and it's true these can be disabled
during the compile time, thus it brings in other set of 'weird'
changes.
|
| |
|
|
|
|
| |
If the libical is installed in a different prefix than the one shared
by other CFLAGS, then the test compilation breaks due to failed search
for the <libical/ical.h> include file.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
o test-client-cursor-create.c
This test checks expected failure error codes and expected successfull
cursor creation in Sync / Async and Normal / DRA modes.
o test-client-cursor-operations.c
A more complex set of tests which run in all various modes
and configurations (i.e. Sync / Async / DRA / Threaded)
|
| |
|
|
|
| |
The new tests check some specific phone number matching cases
with E_BOOK_QUERY_EQUALS_NATIONAL_NUMBER queries.
|
| | |
|
| |
|
|
| |
g_type_init() is deprecated in GLib 2.36.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Reuse the same two addressbooks for every test, so that only the
first 2 tests populate the addressbooks with contacts and the remaining
tests only create a client and execute a query.
Also add all test contacts with a single batch command and dont fetch
the test contacts, also removed the #if 0'd case which is the only
case which required the local contact copies.
|
| |
|
|
|
|
|
|
| |
Unconditional use of the GNU extension LC_ADDRESS causes compiler
errors on non-GNU systems.
In test cases, use LC_MESSAGES if LC_ADDRESS is unavailable.
Also fail gracefully with a log message if setlocale() fails.
|
| | |
|
| |
|
|
| |
Replaces e_book_client_view_get_client().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Removed obsolete test cases:
test-client-nonexistent-id:
Test covered by test-client-remove-contact already
test-client-examine: Unable to easily refactor
test-client-search: A test which only applies to an existing
addressbook, can't be useful in unit tests
stress factories: Not worth refactoring, partly covered by tests
in test-server-utils/test-fixture.c already
o Revived several test cases which were not previously running at make check
o Cleaned up client-test-utils.[ch]: now only includes convenience functions
for loading contacts from the test case vcards.
|
| |
|
|
|
| |
This used to be broken for Async, now that it works let's pin it down with
a working test case for both Sync/Async access to book views.
|