Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3329ecd authored by Etan Cohen's avatar Etan Cohen
Browse files

[P2P] Fix flaky unit test

Unit test format for resource leak detection invalid. Probably cause
of flaky unit test.

Bug: 72941646
Test: unit tests pass locally
Change-Id: Ibd7497b92f118338260c0af48706985172423d0a
parent 0d3813e3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -59,11 +59,11 @@ public class WifiP2pManagerTest {
     */
    @Test
    public void testChannelFinalize() throws Exception {
        WifiP2pManager.Channel channel = new WifiP2pManager.Channel(mContextMock,
                mTestLooper.getLooper(), null, null, mDut);

        try (WifiP2pManager.Channel channel = new WifiP2pManager.Channel(mContextMock,
                mTestLooper.getLooper(), null, null, mDut)) {
            leakageDetectorRule.assertUnreleasedResourceCount(channel, 1);
        }
    }

    /**
     * Validate that when close is called on a channel it frees up resources (i.e. don't