diff options
| author | 2023-06-14 21:16:05 +0000 | |
|---|---|---|
| committer | 2023-06-14 21:16:05 +0000 | |
| commit | bdac3ea1c249600346f7e3db8949e72b9097338a (patch) | |
| tree | e76285ff0c5e4d2b188d13ef3c1a9988ec695836 | |
| parent | 2398cefecefc07a9ab7e0c75f582b00097ba9bee (diff) | |
| parent | 0ebdaad0defde25b6391504ca96ca3c406777cc7 (diff) | |
Merge "binderRpcTest: threadpool race leak"
| -rw-r--r-- | libs/binder/tests/binderRpcTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp index 1ff1de4db8..d352ce5bca 100644 --- a/libs/binder/tests/binderRpcTest.cpp +++ b/libs/binder/tests/binderRpcTest.cpp @@ -691,7 +691,11 @@ TEST_P(BinderRpc, SessionWithIncomingThreadpoolDoesntLeak) { EXPECT_EQ(nullptr, session.promote()); - sleep(1); // give time for remote session to shutdown + // now that it has died, wait for the remote session to shutdown + std::vector<int32_t> remoteCounts; + do { + EXPECT_OK(proc.rootIface->countBinders(&remoteCounts)); + } while (remoteCounts.size() > 1); } TEST_P(BinderRpc, SingleDeathRecipient) { |