summaryrefslogtreecommitdiff
path: root/test/Makefile.in
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2023-05-03 07:47:15 +0000
committerRuediger Pluem <rpluem@apache.org>2023-05-03 07:47:15 +0000
commit4b0778590349e2ff2b07073615f1b82ad83d35de (patch)
tree078f1c5994a5c8410ebbe85828e0f6b7fd74be00 /test/Makefile.in
parent572ffea6a5b1aae06333385cbbec0069c6140ba2 (diff)
downloadapr-4b0778590349e2ff2b07073615f1b82ad83d35de.tar.gz
Check sockets from connection pool before using them and try to reconnect
them if they are not usable any longer. * memcache/apr_memcache.c::ms_find_conn: Check if the socket returned from the connection pool is still readable. If not then invalidate the connection in the pool and request a new one from the connection pool. Repeat this until a valid socket is returned or this was done the maximum number of connections in the pool plus one. This ensures that at least one new socket was created. If a new socket does not work this indicates a broken backend and not just a restart in the past. In this case return an error like previously. * test/testmemcache.c: Add new test for connection validation. * test/memcachedmock.c: For the new test we need a memcached mock server that we control and can restart. * test/testmemcache.h: Shared defines between test/testmemcache.c and test/memcachedmock.c. * test/Makefile.in: * test/Makefile.win: * test/NWGNUmakefile: * test/NWGNUmemcachedmock: Needed changes to build test/memcachedmock.c on different platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/Makefile.in')
-rw-r--r--test/Makefile.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index d32fb3182..4af81ab60 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -52,6 +52,7 @@ TESTALL_COMPONENTS = \
proc_child@EXEEXT@ \
readchild@EXEEXT@ \
sockchild@EXEEXT@ \
+ memcachedmock@EXEEXT@ \
testshmproducer@EXEEXT@ \
testshmconsumer@EXEEXT@ \
tryread@EXEEXT@ \
@@ -156,6 +157,10 @@ OBJECTS_sockchild = sockchild.lo $(LOCAL_LIBS)
sockchild@EXEEXT@: $(OBJECTS_sockchild)
$(LINK_PROG) $(OBJECTS_sockchild) $(ALL_LIBS)
+OBJECTS_memcachedmock = memcachedmock.lo $(LOCAL_LIBS)
+memcachedmock@EXEEXT@: $(OBJECTS_memcachedmock)
+ $(LINK_PROG) $(OBJECTS_memcachedmock) $(ALL_LIBS)
+
OBJECTS_testshmconsumer = testshmconsumer.lo $(LOCAL_LIBS)
testshmconsumer@EXEEXT@: $(OBJECTS_testshmconsumer) $(LOCAL_LIBS)
$(LINK_PROG) $(OBJECTS_testshmconsumer) $(ALL_LIBS)