trunks: stop background thread in transceiver unit test
If background thread is still running when background transceiver
is destroyed, it is possible the thread is still holding some
weak pointers to the transceiver. If so, the transceiver
destructor will fail in DCHECK() when the weak pointer factory
will attempt to destruct those remaining pointers.
BUG=chromium:684141
TEST=For a board with tpm2, add "sleep(3)" to the end of
AssignAndSignal() in background_command_transceiver.cc and run
P2_TEST_FILTER="BackgroundTransceiverTest.Synchronous" \
cros_workon_make --board=$BOARD --test trunks
Change-Id: I42c6e373189a2ad4640ef0e7518acfbc6046c383
Reviewed-on: https://chromium-review.googlesource.com/431503
Commit-Ready: Andrey Pronin <apronin@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
1 file changed