From: Michael Wallner Date: Tue, 29 Sep 2020 06:32:32 +0000 (+0200) Subject: testing: report different server pid X-Git-Tag: 1.1.0-beta1~236^2~43 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fff90287ab3521c9cdc232ea53ec5bc73365c8e4;p=awesomized%2Flibmemcached testing: report different server pid --- 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; }