but you wait for the port to be ready with the waitUntil, no? as you just killed the process, this either immediately returns or takes 5 seconds. could you instead waitUntilGone?

another weird solution could be to count the varnish ports up with each test ;-)