projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge pull request #92 from gitter-badger/gitter-badge
[m6w6/libmemcached]
/
tests
/
libmemcached-1.0
/
parser.cc
diff --git
a/tests/libmemcached-1.0/parser.cc
b/tests/libmemcached-1.0/parser.cc
index f506a8f1ba2a11d2d21200b1d705ae114d959917..b5204a83a712d5c8d7f471c5f2bc84f4c3fa6e12 100644
(file)
--- a/
tests/libmemcached-1.0/parser.cc
+++ b/
tests/libmemcached-1.0/parser.cc
@@
-35,8
+35,8
@@
*
*/
*
*/
-#include
<config.h>
-#include
<libtest/test.hpp>
+#include
"mem_config.h"
+#include
"libtest/test.hpp"
using namespace libtest;
using namespace libtest;
@@
-44,12
+44,12
@@
using namespace libtest;
#include <string>
#include <cerrno>
#include <string>
#include <cerrno>
-#include
<libmemcached/memcached.h>
-#include
<libmemcached/util.h>
+#include
"libmemcached-1.0/memcached.h"
+#include
"libmemcachedutil-1.0/util.h"
-#include
<tests/libmemcached-1.0/parser.h>
-#include
<tests/print.h>
-#include "libmemcached/instance.h"
+#include
"tests/libmemcached-1.0/parser.h"
+#include
"tests/print.h"
+#include "libmemcached/instance.h
pp
"
enum scanner_type_t
{
enum scanner_type_t
{
@@
-85,7
+85,7
@@
struct scanner_variable_t {
// Check and make sure the first host is what we expect it to be
static test_return_t __check_host(memcached_st *memc, const scanner_string_st &hostname)
{
// Check and make sure the first host is what we expect it to be
static test_return_t __check_host(memcached_st *memc, const scanner_string_st &hostname)
{
-
memcached_server_instance_st
instance=
+
const memcached_instance_st *
instance=
memcached_server_instance_by_position(memc, 0);
test_true(instance);
memcached_server_instance_by_position(memc, 0);
test_true(instance);
@@
-356,7
+356,7
@@
test_return_t libmemcached_check_configuration_with_filename_test(memcached_st*)
libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""), buffer, sizeof(buffer)),
buffer);
libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""), buffer, sizeof(buffer)),
buffer);
- test_compare_hint(MEMCACHED_
SUCCESS
,
+ test_compare_hint(MEMCACHED_
PARSE_ERROR
,
libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=support/example.cnf"), buffer, sizeof(buffer)),
buffer);
libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=support/example.cnf"), buffer, sizeof(buffer)),
buffer);
@@
-617,7
+617,7
@@
test_return_t random_statement_build_test(memcached_st*)
}
static memcached_return_t dump_server_information(const memcached_st *,
}
static memcached_return_t dump_server_information(const memcached_st *,
-
memcached_server_instance_st
instance,
+
const memcached_instance_st *
instance,
void *)
{
if (strcmp(memcached_server_name(instance), "localhost"))
void *)
{
if (strcmp(memcached_server_name(instance), "localhost"))
@@
-667,7
+667,7
@@
struct socket_weight_t {
};
static memcached_return_t dump_socket_information(const memcached_st *,
};
static memcached_return_t dump_socket_information(const memcached_st *,
-
memcached_server_instance_st
instance,
+
const memcached_instance_st *
instance,
void *context)
{
socket_weight_t *check= (socket_weight_t *)context;
void *context)
{
socket_weight_t *check= (socket_weight_t *)context;
@@
-737,9
+737,6
@@
test_return_t test_parse_socket(memcached_st *)
*/
test_return_t regression_bug_71231153_connect(memcached_st *)
{
*/
test_return_t regression_bug_71231153_connect(memcached_st *)
{
- if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
- return TEST_SKIPPED;
-
{ // Test the connect-timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --CONNECT-TIMEOUT=0"));
test_true(memc);
{ // Test the connect-timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --CONNECT-TIMEOUT=0"));
test_true(memc);
@@
-761,11
+758,6
@@
test_return_t regression_bug_71231153_connect(memcached_st *)
test_return_t regression_bug_71231153_poll(memcached_st *)
{
test_return_t regression_bug_71231153_poll(memcached_st *)
{
- if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
- {
- return TEST_SKIPPED;
- }
-
{ // Test the poll timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --POLL-TIMEOUT=0"));
test_true(memc);
{ // Test the poll timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --POLL-TIMEOUT=0"));
test_true(memc);