Skip to content

Raise if TestContext didn't exit cleanly

If the device server hangs, then the test context would hang during shutdown. Such a device server is a problem, so at least tell the user that this has happened.

If we are using a subprocess, then we can kill the process, so the test framework won't get stuck. We don't make the process a daemon, because that would prevent it launching additional subprocesses - the user's device might do this.

If we are using a thread (i.e., device server in the same process as the test runner), then we can't stop it. We make the test context thread a daemon so that at least the test framework won't hang. (If the user's device has stuck, non-daemon threads then it will still hang - we can't fix that).

We change the omniORB setting ORBscanGranularity from 0 to 1 second to give faster shutdown on Windows (unintuitive, but it helps). It doesn't seem to affect Linux/macOS. The original setting of 0 (from sourceforge bug 819) doesn't actually help if Tango clients are created before the TestContext is launched, since the default timeout (5 seconds) will still be used for the client cleaned before starting the device server.

Merge request reports

Loading