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

Skip to content
Commit 65cf92cf authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

VolumeControlService: Improve succeed connect test

If service got stopped when connect is ongoing, it seems
sent intent will not contain valid device, which will break a test:

java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at org.junit.Assert.assertNotNull(Assert.java:723)
	at com.android.bluetooth.vc.VolumeControlServiceTest$VolumeControlIntentReceiver.onReceive(VolumeControlServiceTest.java:154)

For the testing purpose we want to keep null check in the
broadcastreceiver, therefore we change a test in the way that it ends
when CONNECTING state is propagated.

Bug: 209486207
Test: atest VolumeControlServiceTest
Change-Id: I5167aeca83e84fe5a78f29554e9d61d62a12426c
parent a7966cef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment