Currently cancelOnGracefulShutdown hangs forever, if cancellation is not immediately but returns a eventually successful result (test case 1: testCancelOnGracefulShutdownSurvivesCancellation).
If the Cancellation leads to another error than CancellationError, this error is currently not propagated to the user (test case 2: testCancelOnGracefulShutdownSurvivesErrorThrown).
Changes
AsyncGracefulShutdownSequence should never throw as this hides the real errors otherwise
CancellationWaiter should never throw as this hides the real errors otherwise
Motivation
Currently
cancelOnGracefulShutdown
hangs forever, if cancellation is not immediately but returns a eventually successful result (test case 1:testCancelOnGracefulShutdownSurvivesCancellation
). If the Cancellation leads to another error thanCancellationError
, this error is currently not propagated to the user (test case 2:testCancelOnGracefulShutdownSurvivesErrorThrown
).Changes
AsyncGracefulShutdownSequence
should never throw as this hides the real errors otherwiseCancellationWaiter
should never throw as this hides the real errors otherwisecancelOnGracefulShutdown
Result
cancelOnGracefulShutdown
works as expected