media/testutils/src/test/java/com/google/android/exoplayer2/testutil
tonihei 83b7f8085c Ensure messages sent on a dead thread don't block FakeClock execution
FakeClock keeps an internal list of messages to be executed to
ensure deterministic serialization. The next message from the list
is triggered by a separate helper message sent to the real Handler.
However, if the target HandlerThread is no longer alive (e.g. when
it quit itself during the message execution), this helper
message is never executed and the entire message execution chain
is stuck forever.

This can be solved by checking the return values of Hander.post or
Handler.sendMessage, which are false if the message won't be
delivered. If the messages are not delivered, we can unblock the
chain by marking the message as complete and triggering the next
one.

PiperOrigin-RevId: 491275031
(cherry picked from commit 2977bef872)
2023-01-25 17:39:47 +00:00
..
truth Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
AdditionalFailureInfoTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
FakeAdaptiveDataSetTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
FakeClockTest.java Ensure messages sent on a dead thread don't block FakeClock execution 2023-01-25 17:39:47 +00:00
FakeDataSetTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
FakeDataSourceContractTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
FakeDataSourceTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00
FakeMediaSourceFactoryTest.java Plumb PlayerId to MediaSource. 2021-11-11 10:49:35 +00:00
FakeTimelineTest.java Do not manipulate the duration of SSAI periods in FakeTimeline 2022-02-21 17:12:06 +00:00
WebServerDispatcherTest.java Remove @DoNotInstrument from test classes 2021-07-09 08:58:38 +01:00