As part of integrating CancellationToken with the code-base, the interruption interface of PrimaryOnlyService is being replaced by CancellationToken (e.g., see this commit). As a result, the unit-tests for the interrupt interface are disabled and the run interface for each service receives a CancellationToken. However, the move towards using cancellation tokens to interrupt instances of PrimaryOnlyService is incomplete:
- Interrupting an instance through a CancellationToken does not notify the service about the reason for cancellation. Therefore, some services use multiple cancellation tokens internally, and others still rely on the interruption interface.
- The interruption interface is not deprecated, but it is not being tested. The interface already has some known issues that must be fixed if we decide to keep.
This ticket should extend the functionally of CancellationToken to relay a Status to instances of PrimaryOnlyService and deprecate the interruption interface, or reenable the unit-tests for the interruption interface and fix its existing issues.