From a4df85a0ee26bd18d7f7780c19829e3902b11426 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 3 Aug 2015 12:59:57 +0200 Subject: [PATCH] add more logging --- tests/helper/pipeline.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/helper/pipeline.inc b/tests/helper/pipeline.inc index b7175c1..942d254 100644 --- a/tests/helper/pipeline.inc +++ b/tests/helper/pipeline.inc @@ -11,16 +11,18 @@ function respond($client, $msg) { serve(function($client) { $count = trim(fgets(STDIN)); - + logger("Expecting %d messages", $count); /* the peek message */ respond($client, new http\Message($client, false)); - + logger("Handled the peek request"); /* pipelined messages */ $req = array(); for ($i=0; $i < $count; ++ $i) { $req[] = new http\Message($client, false); + logger("Read request no. %d", $i+1); } - foreach ($req as $msg) { + foreach ($req as $i => $msg) { respond($client, $msg); + logger("Sent response no. %d", $i+1); } }); -- 2.30.2