aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2021-02-06 13:05:45 -0800
committerRob Landley <rob@landley.net>2021-02-06 19:33:13 -0600
commit9f7f62615f3963591af33fcc7582867f7063efd2 (patch)
treeccf2197b9cd25f70174dd79c7014559f706b8bc2 /tests
parent859764984485fd0d7f92b0f49430832c3d95888e (diff)
downloadtoybox-9f7f62615f3963591af33fcc7582867f7063efd2.tar.gz
netcat.test: reduce flake.
Starting two netcats at the same time and expecting them to be able to talk to each is a little optimistic. I don't know whether `sleep .1` will be sufficient, but wanted to try that before going to `sleep 1` since neither the toybox nor the github nor the Android infrastructure is running these tests in parallel, those seconds add up. Right now this has a ~20% flake rate on the Android infrastructure. I was able to reproduce the flake locally with `while true ; do make test_netcat ; done` on my desktop before this patch, but not after. (Though my desktop is way overpowered for just running that, whereas the build servers tend to be pretty busy, which is why I reserve the right to return later with a longer delay.)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/netcat.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/netcat.test b/tests/netcat.test
index 40b51d40..81e6ec7d 100755
--- a/tests/netcat.test
+++ b/tests/netcat.test
@@ -6,6 +6,6 @@
{ dd if=/dev/zero bs=4k count=1 2>/dev/null | tr '\0' a; echo b; } > testfile
testing "more than buffer bytes left at end" \
- "netcat -lp 1234 wc -c & cat testfile | netcat 127.0.0.1 1234" \
+ "netcat -lp 1234 wc -c & sleep .1 && cat testfile | netcat 127.0.0.1 1234" \
"4098\n" "" ""
rm -f testfile