Cancel active Futures/Callbacks if transport dies.
Callers would remain blocked until AndroidFuture or TransportClient- Callback times out (upto 10mins) in the situation where the Transport dies during an operation. This change adds queues for the futures and callbacks that are active. If they complete normally, they are dequeued. If the TransportConnection forwards a notification that the transport dies, then all queued active futures and callbacks are cancelled. Add a unit test for BackupTransportClient to test the cancellation logic for futures and callbacks. This is multithreaded so was tested with 500 iterations to weed out the possibility of race conditions. BUG: 202716271 Change-Id: I6924c89753f85b9d78a1c6e61518dc1c1e617ef3 Test: atest --iterations 500 BackupTransportClientTest atest --iterations 500 TransportStatusCallbackTest atest CtsBackupTestCases CtsBackupHostTestCases (Gts tests still in progress)
Loading
Please register or sign in to comment