Powershell Wait-Job does not return reliably
from a Jenkins Pipeline we call a powershell script that calls a tool to execute some tests. We want the pipeline to wait for the test execution being finished. As a fallback in case of any issues we define a maximum test execution time as a timeout for the job. Usually this works fine. In some occassions, however, the Wait-Job does not return before the timeout, although we can see on the VM where the process is executed, that the tool process exited. All test results are there, no exceptions visible. We have a clean test run but the job seems to be hanging somehow.