using namespace libtest;
-static test_return_t _default_callback(void *p)
+static test_return_t _default_callback(void*)
{
- (void)p;
-
return TEST_SUCCESS;
}
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item.set_flush((test_callback_fn*)world_flush);
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;
PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
EXTRA_DIST+= tests/cpp_example.cc
-EXTRA_DIST+= tests/output_plus.res
noinst_HEADERS+= tests/exist.h
noinst_HEADERS+= tests/keys.hpp
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item.set_flush((test_callback_fn*)world_flush);
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item.set_flush((test_callback_fn*)world_flush);
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item._flush= (test_callback_fn*)world_flush;
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true);
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
- test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+ test_true(check_execute > (global_count / 2));
return TEST_SUCCESS;
}
unsigned int check_execute= execute_set(memc, global_pairs, global_count);
- test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+ test_true_hint(check_execute > (global_count / 2),
+ "Possible false, positive, memcached may have ejected key/value based on memory needs");
return TEST_SUCCESS;
}
free(return_value);
}
}
- test_compare_warn_hint(global_count, keys_returned, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+ test_true_hint(keys_returned > (global_count / 2),
+ "Possible false, positive, memcached may have ejected key/value based on memory needs");
return TEST_SUCCESS;
}
{
unsigned int keys_returned;
test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned));
- test_true(keys_returned > 0);
- test_compare_warn_hint(global_count, keys_returned, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+ test_true(keys_returned > (global_count / 2));
}
return TEST_SUCCESS;
total++;
}
}
- test_compare_warn_hint(global_count, total, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+ test_true_hint(total > (global_count / 2),
+ "Possible false, positive, memcached may have ejected key/value based on memory needs");
return TEST_SUCCESS;
}
total++;
}
}
- test_compare_warn_hint(global_count, total, "Possible false, positive, memcached may have ejected key/value based on memory needs");
+
+ test_true_hint(total > (global_count / 2),
+ "Possible false, positive, memcached may have ejected key/value based on memory needs");
return TEST_SUCCESS;
}
world->_destroy= world_destroy;
world->item._startup= reinterpret_cast<test_callback_fn*>(world_test_startup);
- world->item._flush= reinterpret_cast<test_callback_fn*>(world_flush);
world->_on_error= reinterpret_cast<test_callback_error_fn*>(world_on_error);
world->collection_startup= reinterpret_cast<test_callback_fn*>(world_container_startup);
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item.set_flush((test_callback_fn*)world_flush);
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;
return TEST_SUCCESS;
}
-test_return_t world_flush(libmemcached_test_container_st *container);
-test_return_t world_flush(libmemcached_test_container_st *container)
-{
- test_true(container->memc);
- memcached_flush(container->memc, 0);
- memcached_quit(container->memc);
-
- return TEST_SUCCESS;
-}
-
static test_return_t world_on_error(test_return_t , libmemcached_test_container_st *container)
{
test_true(container->memc);
return TEST_SUCCESS;
}
-test_return_t world_flush(libmemcached_test_container_st *container);
-test_return_t world_flush(libmemcached_test_container_st *container)
-{
- test_true(container->memc);
- memcached_flush(container->memc, 0);
- memcached_quit(container->memc);
-
- return TEST_SUCCESS;
-}
-
static test_return_t world_on_error(test_return_t , libmemcached_test_container_st *container)
{
test_true(container->memc);
world->_destroy= (test_callback_destroy_fn*)world_destroy;
world->item._startup= (test_callback_fn*)world_test_startup;
- world->item._flush= (test_callback_fn*)world_flush;
world->_on_error= (test_callback_error_fn*)world_on_error;
world->collection_startup= (test_callback_fn*)world_container_startup;