Make a test result intentionally unstable

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Make a test result intentionally unstable

I have a unit test that from time to time deadlocks. To work around that and at least finish the build and collect the results available so far I made use of a timeout in a try and caught the timeout. When this timeout applies now, I get an overall green testrun which is not what I want. When I want so set the test result to 'unstable' either by calling 'unstable' or by setting the result to the string 'UNSTABLE' I still get a succeeded run.

This is my script code, called from a declarative pipeline from the build stages of severak modules/libraries in a build:

(time: 60, unit: 'MINUTES') {                
            rem call my test from here

} catch (err) {
"Caught: ${err}"
//currentBuild.result = 'UNSTABLE';
( message: "Test timeout in stage ${STAGE_NAME}" )

Any ideas whats wrong here?

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit