Tests should probably add more timeouts in order to help debug what's actually going wrong. Could be the termination monitoring or the waitid perhaps?