static void
_round_init (void)
{
	sqlx_cache_t *cache = sqlx_cache_init();
	g_assert(cache != NULL);
	sqlx_cache_set_close_hook(cache, sqlite_close);
	sqlx_cache_debug(cache);
	sqlx_cache_expire(cache, 0, 0);
	sqlx_cache_clean(cache);
}
static void
test_lock (void)
{
	sqlx_cache_t *cache = sqlx_cache_init();
	g_assert(cache != NULL);
	sqlx_cache_set_close_hook(cache, sqlite_close);
	for (int i=0; i<5 ;++i)
		_round_lock (cache);
	sqlx_cache_expire(cache, 0, 0);
	sqlx_cache_clean(cache);
}
Esempio n. 3
0
int
main(int argc, char ** argv)
{
	HC_PROC_INIT(argv, GRID_LOGLVL_TRACE2);

	(void) argc;
	sqlx_cache_t *cache = sqlx_cache_init();
	g_assert(cache != NULL);
	sqlx_cache_set_close_hook(cache, sqlite_close);

	test_fail(cache);
	test_regular(cache);

	sqlx_cache_debug(cache);
	sqlx_cache_expire(cache, 0, NULL, NULL);
	sqlx_cache_clean(cache);
	return 0;
}