diff options
| author | David Bremner <david@tethera.net> | 2020-08-08 11:16:37 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-02-06 18:56:05 -0400 |
| commit | 4743e87c2c79c37208bb60d6617ef203796fc5c2 (patch) | |
| tree | 5375640448e91c4bf77bb29a7d5c0791bf3ce8f1 /test/T562-lib-database.sh | |
| parent | 763445beaec906440fbdd497755718ef860b88e4 (diff) | |
lib: cache configuration information from database
The main goal is to allow configuration information to be temporarily
overridden by a separate config file. That will require further
changes not in this commit.
The performance impact is unclear, and will depend on the balance
between number of queries and number of distinct metadata items read
on the first call to n_d_get_config.
Diffstat (limited to 'test/T562-lib-database.sh')
| -rwxr-xr-x | test/T562-lib-database.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index dd4f2566..887851dd 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -340,7 +340,7 @@ test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "get config from closed database" cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} { - const char *result; + char *result; EXPECT0(notmuch_database_close (db)); stat = notmuch_database_get_config (db, "foo", &result); printf("%d\n", stat == NOTMUCH_STATUS_XAPIAN_EXCEPTION); @@ -348,9 +348,8 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} EOF cat <<EOF > EXPECTED == stdout == -1 +0 == stderr == -Error: A Xapian exception occurred getting metadata: Database has been closed EOF test_expect_equal_file EXPECTED OUTPUT @@ -376,7 +375,7 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} notmuch_indexopts_t *result; EXPECT0(notmuch_database_close (db)); result = notmuch_database_get_default_indexopts (db); - printf("%d\n", result == NULL); + printf("%d\n", result != NULL); } EOF cat <<EOF > EXPECTED |
