From fff90287ab3521c9cdc232ea53ec5bc73365c8e4 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 29 Sep 2020 08:32:32 +0200 Subject: [PATCH] testing: report different server pid --- test/lib/Server.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/lib/Server.cpp b/test/lib/Server.cpp index 17bafe74..f31819e8 100644 --- a/test/lib/Server.cpp +++ b/test/lib/Server.cpp @@ -130,7 +130,12 @@ bool Server::isListening() { } Malloced stat(memcached_stat(*memc, nullptr, nullptr)); - if (!*stat || !stat->pid || stat->pid != pid) { + if (!*stat || !stat->pid) { + return false; + } + if (stat->pid != pid) { + cerr << "Another server is listening on " << socket_or_port + << " (expected pid " << pid << " found pid " << stat->pid << ")\n"; return false; } -- 2.30.2