server: check timeout before test, to not give an extra error if last test expired the timeout