test: wait a bit after stopping the test service
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 8 Apr 2020 10:12:46 +0000 (12:12 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 8 Apr 2020 10:15:52 +0000 (12:15 +0200)
commite00e2e0b50bbd120290572c8d1242703fb98b34e
treeb84c44ea84003a74cfbee4f1259a87f5ade98725
parente6b68254c22064ed4a159ea5a1405423774e09f6
test: wait a bit after stopping the test service

Give systemd a chance to process the stop event before checking if the
PID has indeed leaked. This should fix the intermittent test fails in CI
even with a fixed systemd version, like this one:

```
Apr 08 10:22:09 testsuite-47.sh[345]: ++ cat /leakedtestpid
Apr 08 10:22:09 testsuite-47.sh[334]: + leaked_pid=342
Apr 08 10:22:09 testsuite-47.sh[334]: + systemctl stop testsuite-47-repro
Apr 08 10:22:10 testsuite-47.sh[334]: + ps -p 342
Apr 08 10:22:10 testsuite-47.sh[348]:     PID TTY          TIME CMD
Apr 08 10:22:10 testsuite-47.sh[348]:     342 ?        00:00:00 sleep
Apr 08 10:22:10 testsuite-47.sh[334]: + exit 42
```

Followup to 197298ff9fc930de450330095cc5b67d165d0801
test/units/testsuite-47.sh