projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
libmemcached: fix #53 with supplied patch
[m6w6/libmemcached]
/
tests
/
cycle.cc
diff --git
a/tests/cycle.cc
b/tests/cycle.cc
index ac087f4f2e6f47c28e24c426b4231ff02a63cf24..0137b03895dad3d715dc222b5fb9166652fe4b5b 100644
(file)
--- a/
tests/cycle.cc
+++ b/
tests/cycle.cc
@@
-39,16
+39,16
@@
Test that we are cycling the servers we are creating during testing.
*/
Test that we are cycling the servers we are creating during testing.
*/
-#include <config.h>
+#include <
mem_
config.h>
#include <libtest/test.hpp>
using namespace libtest;
#include <libtest/test.hpp>
using namespace libtest;
-#include <libmemcached/memcached.h>
+#include <libmemcached
-1.0
/memcached.h>
static test_return_t server_startup_single_TEST(void *obj)
{
server_startup_st *servers= (server_startup_st*)obj;
static test_return_t server_startup_single_TEST(void *obj)
{
server_startup_st *servers= (server_startup_st*)obj;
- test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(),
0, NULL, false
));
+ test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(),
NULL
));
test_compare(true, servers->shutdown());
test_compare(true, servers->shutdown());
@@
-57,10
+57,12
@@
static test_return_t server_startup_single_TEST(void *obj)
static test_return_t server_startup_multiple_TEST(void *obj)
{
static test_return_t server_startup_multiple_TEST(void *obj)
{
+ test_skip(true, jenkins_is_caller());
+
server_startup_st *servers= (server_startup_st*)obj;
server_startup_st *servers= (server_startup_st*)obj;
- for (size_t x= 0; x < 10;
x++
)
+ for (size_t x= 0; x < 10;
++x
)
{
{
- test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(),
0, NULL, false
));
+ test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(),
NULL
));
}
test_compare(true, servers->shutdown());
}
test_compare(true, servers->shutdown());
@@
-70,7
+72,7
@@
static test_return_t server_startup_multiple_TEST(void *obj)
static test_return_t shutdown_and_remove_TEST(void *obj)
{
server_startup_st *servers= (server_startup_st*)obj;
static test_return_t shutdown_and_remove_TEST(void *obj)
{
server_startup_st *servers= (server_startup_st*)obj;
- servers->
shutdown_and_remove
();
+ servers->
clear
();
return TEST_SUCCESS;
}
return TEST_SUCCESS;
}
@@
-106,7
+108,7
@@
static test_return_t validate_sanity_INIT(void *object)
static test_return_t collection_FINAL(void *object)
{
server_startup_st *servers= (server_startup_st*)object;
static test_return_t collection_FINAL(void *object)
{
server_startup_st *servers= (server_startup_st*)object;
- servers->
shutdown_and_remove
();
+ servers->
clear
();
return TEST_SUCCESS;
}
return TEST_SUCCESS;
}
@@
-116,14
+118,26
@@
collection_st collection[] ={
{0, 0, 0, 0}
};
{0, 0, 0, 0}
};
-static void *world_create(server_startup_st& servers, test_return_t& )
+static void *world_create(server_startup_st& servers, test_return_t&
error
)
{
{
+ if (jenkins_is_caller())
+ {
+ error= TEST_SKIPPED;
+ return NULL;
+ }
+
+ if (libtest::has_memcached() == false)
+ {
+ error= TEST_SKIPPED;
+ return NULL;
+ }
+
return &servers;
}
return &servers;
}
-void get_world(
Framework *
world)
+void get_world(
libtest::Framework*
world)
{
{
- world->collections
= collection
;
- world->
_create= world_create
;
+ world->collections
(collection)
;
+ world->
create(world_create)
;
}
}