diff --git a/tests/data/test587 b/tests/data/test587
index ff11184a36..2fc8a73577 100644
--- a/tests/data/test587
+++ b/tests/data/test587
@@ -31,7 +31,9 @@ lib%TESTNUMBER
HTTP multi-part formpost with aborted read callback
-
+# Add a delay to give server time to write its output since we otherwise might
+# not even give it enough time to write its lock file.
+
http://%HOSTIP:%HTTPPORT/%TESTNUMBER