X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached_world.h;h=dfdddbefe00796336603fa2af813c8c9ef42eef8;hb=12a07e58df95bb8dbe167e4157b29c910177ade8;hp=a6de23a0f520bc1252d11c14003dcbdedcc0f194;hpb=7abcaebdc4c3dd11b779eaef58a7371fb82ae888;p=awesomized%2Flibmemcached diff --git a/tests/libmemcached_world.h b/tests/libmemcached_world.h index a6de23a0..dfdddbef 100644 --- a/tests/libmemcached_world.h +++ b/tests/libmemcached_world.h @@ -40,8 +40,6 @@ test_return_t world_post_run(libmemcached_test_container_st *); test_return_t world_on_error(test_return_t, libmemcached_test_container_st *); test_return_t world_destroy(libmemcached_test_container_st *); -static libmemcached_test_container_st global_container; - /** @note generic shutdown/startup for libmemcached tests. */ @@ -50,9 +48,8 @@ test_return_t world_container_shutdown(libmemcached_test_container_st *container libmemcached_test_container_st *world_create(test_return_t *error) { - global_container.construct.count= SERVERS_TO_CREATE; - global_container.construct.udp= 0; - if (not server_startup(&global_container.construct)) + libmemcached_test_container_st *global_container= new libmemcached_test_container_st(); + if (not server_startup(&global_container->construct)) { *error= TEST_FAILURE; return NULL; @@ -60,7 +57,7 @@ libmemcached_test_container_st *world_create(test_return_t *error) *error= TEST_SUCCESS; - return &global_container; + return global_container; } test_return_t world_container_startup(libmemcached_test_container_st *container) @@ -150,6 +147,8 @@ test_return_t world_destroy(libmemcached_test_container_st *container) sasl_done(); #endif + delete container; + return TEST_SUCCESS; }