aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/h2specd_SUITE.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/h2specd_SUITE.erl b/test/h2specd_SUITE.erl
index de17341..7153a7b 100644
--- a/test/h2specd_SUITE.erl
+++ b/test/h2specd_SUITE.erl
@@ -68,7 +68,12 @@ receive_infinity(Port, Acc) ->
receive
{Port, {data, {eol, Line}}} ->
ct:log("~ts", [Line]),
- io:format(user, "~s~n", [Line]),
+ %% Somehow we may receive the same line multiple times.
+ %% We therefore only print if it's a line we didn't print before.
+ case lists:member(Line, Acc) of
+ false -> io:format(user, "~s~n", [Line]);
+ true -> ok
+ end,
receive_infinity(Port, [Line|Acc]);
{Port, Reason={exit_status, _}} ->
ct:log("~ts", [[[L, $\n] || L <- lists:reverse(Acc)]]),