Test step fails with "Too long with no output (exceeded 10m0s)"

However, when I rerun with SSH and run the same test manually from the ssh session it succeeds. How can I make the CI succeed?

Do the tests take longer than 10 minutes? If so, you need to either increase the output timeout or add some dummy output so that the task is not killed.

If your tests do not take longer than 10 minutes then it is possible that your test runner is not exiting properly.