Some of the Jetty graceful shutdown tests were flaky due to the way in which Jetty behaves when it is stopped. Stopping the Jetty web server interrupts the thread that's handling the active request. This initiates a race between the request-handling thread which will decrement the number of active requests and the main thread which expects an active request to cause the shutdown result to be REQUESTS_ACTIVE. The test passes when the main thread wins and fails as a request is active which it's checked. When the request-handling thread wins the test fails as the count of active requests has been deprecated before it is checked. The blocking servlet that's used to stall a request and keep it active needs to be updated to ignore the thread being interrupted and continue waiting. This will ensure that a request remains active until the main thread has checked the active request count and determine the result of the shutdown. Closes gh-27464 |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||