Merge pull request #4198 from sysown/v2.x-fix_test_builds

V2.x fix test builds
pull/4202/head
René Cannaò 3 years ago committed by GitHub
commit 6b939bb6fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,7 +23,6 @@
#include <resolv.h>
#include <arpa/inet.h>
#include <pthread.h>
#include "SpookyV2.h"
#include <fcntl.h>
#include <sys/utsname.h>

@ -61,6 +61,10 @@ CITYHASH_DIR=$(DEPS_PATH)/cityhash/cityhash/
CITYHASH_IDIR=$(CITYHASH_DIR)
CITYHASH_LDIR=$(CITYHASH_DIR)/src/.libs
COREDUMPER_DIR=$(DEPS_PATH)/coredumper/coredumper
COREDUMPER_IDIR=$(COREDUMPER_DIR)/include
COREDUMPER_LDIR=$(COREDUMPER_DIR)/src
IDIR=../../../include
LDIR=../../../lib
TAP_LIBDIR=../tap
@ -76,9 +80,19 @@ OBJ=../../../src/obj/proxysql_global.o ../../../src/obj/main.o ../../../src/obj/
INCLUDEDIRS=-I../tap -I$(RE2_PATH) -I$(IDIR) -I$(JEMALLOC_IDIR) -I$(SQLITE3_DIR) -I$(MICROHTTPD_IDIR) -I$(LIBHTTPSERVER_IDIR) -I$(CURL_IDIR) -I$(DAEMONPATH_IDIR) -I$(MARIADB_IDIR) -I$(SSL_IDIR) -I$(JSON_IDIR) -I$(LIBCONFIG_IDIR) -I$(PROMETHEUS_IDIR) -I$(EV_IDIR)
LDIRS=-L$(TAP_LIBDIR) -L$(LDIR) -L$(JEMALLOC_LDIR) $(LIBCONFIG_LDIR) -L$(RE2_PATH)/obj -L$(MARIADB_LDIR) -L$(DAEMONPATH_LDIR) -L$(PCRE_LDIR) -L$(MICROHTTPD_LDIR) -L$(LIBHTTPSERVER_LDIR) -L$(LIBINJECTION_LDIR) -L$(CURL_LDIR) -L$(EV_LDIR) -L$(SSL_LDIR) -L$(PROMETHEUS_LDIR)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LDIRS+= -L$(COREDUMPER_LDIR)
endif
MYLIBS=-Wl,--export-dynamic -Wl,-Bstatic -lconfig -lproxysql -ldaemon -ljemalloc -lconfig++ -lre2 -lpcrecpp -lpcre -lmariadbclient -lhttpserver -lmicrohttpd -linjection -lcurl -lssl -lcrypto -lev -Wl,-Bdynamic -lgnutls -lpthread -lm -lz -lrt $(EXTRALINK) -lprometheus-cpp-pull -lprometheus-cpp-core -luuid
STATIC_LIBS= $(SSL_LDIR)/libssl.a $(SSL_LDIR)/libcrypto.a $(CITYHASH_LDIR)/libcityhash.a
ifeq ($(UNAME_S),Linux)
STATIC_LIBS+= $(COREDUMPER_LDIR)/libcoredumper.a
endif
.PHONY: all
all: tests

@ -23,7 +23,6 @@
#include <resolv.h>
#include <arpa/inet.h>
#include <pthread.h>
#include "SpookyV2.h"
#include <fcntl.h>
#include <sys/utsname.h>

@ -23,7 +23,6 @@
#include <resolv.h>
#include <arpa/inet.h>
#include <pthread.h>
#include "SpookyV2.h"
#include <fcntl.h>
#include <sys/utsname.h>
@ -253,7 +252,7 @@ void SQLite3_Server_session_handler(MySQL_Session *sess, void *_pa, PtrSize_t *p
ok(actual_timeouts == num_timeouts, "Another timeout processed. Number expected timeouts is equal to number of actual timeouts. Expected [%d]. Actual [%d]", num_timeouts, actual_timeouts);
auto max_timeouts = mysql_thread___monitor_galera_healthcheck_max_timeout_count;
std::unique_ptr<SQLite3_result> rs = std::unique_ptr<SQLite3_result>(MyHGM->dump_table_mysql_servers());
std::unique_ptr<SQLite3_result> rs = std::unique_ptr<SQLite3_result>(MyHGM->dump_table_mysql("mysql_servers"));
for (auto r : rs->rows) {
if (!strcmp(r->fields[1], "127.1.1.11") && !strcmp(r->fields[0],"2274") && actual_timeouts == max_timeouts && num_timeouts == max_timeouts) {
ok(true, "Number of max timeouts reached. Host goes offline. Max timeouts count %d, actual number of timeouts %d", max_timeouts, actual_timeouts);

@ -23,7 +23,6 @@
#include <resolv.h>
#include <arpa/inet.h>
#include <pthread.h>
#include "SpookyV2.h"
#include <fcntl.h>
#include <sys/utsname.h>
@ -266,7 +265,7 @@ void SQLite3_Server_session_handler(MySQL_Session *sess, void *_pa, PtrSize_t *p
}
delete rs1;
std::unique_ptr<SQLite3_result> rs = std::unique_ptr<SQLite3_result>(MyHGM->dump_table_mysql_servers());
std::unique_ptr<SQLite3_result> rs = std::unique_ptr<SQLite3_result>(MyHGM->dump_table_mysql("mysql_servers"));
for (auto r : rs->rows) {
if (r->fields[0] && r->fields[1] && !strcmp(r->fields[1], "127.1.1.11") && strcmp(r->fields[0],"2274")) {
ok(true, "Host stays online. Max timeouts count [%d], number of timeouts in a row [%d], generated timeouts [%d]", max_timeouts, actual_timeouts, num_timeouts);

Loading…
Cancel
Save