Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <cole.miller@canonical.com>
  • Loading branch information
cole-miller committed Nov 21, 2022
1 parent 4cac151 commit 8550472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/leader.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ static void resetBarrierCb(struct barrier *barrier, int status)
goto finish;
}

#if SQLITE_VERSION_NUMBER >= 302400
#if SQLITE_VERSION_NUMBER >= 3024000
vfs = sqlite3_vfs_find(l->db->config->name);
assert(vfs != NULL);
usage = VfsDatabaseMemoryUsage(vfs, l->db->filename);
Expand All @@ -480,6 +480,7 @@ static void resetBarrierCb(struct barrier *barrier, int status)
rv = sqlite3_db_config(l->conn, SQLITE_DBCONFIG_RESET_DATABASE, 1, 0);
assert(rv == 0);
exec->status = sqlite3_exec(l->conn, "VACUUM", NULL, NULL, NULL);
tracef("reset barrier cb exec status:%d", exec->status);
rv = sqlite3_db_config(l->conn, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0);
assert(rv == 0);

Expand Down Expand Up @@ -509,6 +510,7 @@ static void resetBarrierCb(struct barrier *barrier, int status)
tracef("reset barrier cb not supported");
(void)vfs;
(void)frames;
(void)usage;
(void)n;
(void)i;
rv = DQLITE_ERROR;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ TEST_CASE(request_cluster, unrecognizedFormat, NULL)
return MUNIT_OK;
}

#if SQLITE_VERSION_NUMBER >= 302400
#if SQLITE_VERSION_NUMBER >= 3024000

/******************************************************************************
*
Expand Down Expand Up @@ -2133,7 +2133,7 @@ TEST_CASE(reset, simple, NULL)
return MUNIT_OK;
}

#endif /* SQLITE_VERSION_NUMBER >= 302400 */
#endif /* SQLITE_VERSION_NUMBER >= 3024000 */

/******************************************************************************
*
Expand Down

0 comments on commit 8550472

Please sign in to comment.