Add the minimun connection time out for `curl` call
The time to pod network test harness was hanging when the net server was
not ready due to the curl execution because curl has its own connection
time out and it can be up to two minutes. Now, such connection time out is set
to one second.
nc measurements, which do pretty much the same without http, have recorded > 1 s timeouts when running > 400 pods with Canal CNI. After 700 pods, already more than 5 % of round trip times (including tcp/ip connect-send-recv-close like here as well) have exceeded 1 s.
In case timeout leads to a test failure, I'd vote for a longer timeout. On the other hand, if it will not fail the test, we'll just get faster test execution and prettier graph than in nc tests because of not having to scale y axis to 8000 ms, for instance. :)
@marcemq, I tested this by causing timeouts to the curl request: I rebooted the node where net-serve pod was running, and alternatively suspended the agnhost process (kill -STOP $(pidof agnhost)).
I'd suggest adding --max-time 1 after --connect-timeout 1, because otherwise curl was still able to hang.
I'd also suggest adding net-serve* service cleanups in the cleanup() routine. Currently services can be left behind after failed retries due to curl timeouts, because set -e forces exit when waitForProcess fails. Services that are left behind will fail the next test run.