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

Commit 833809c4 authored by William Escande's avatar William Escande
Browse files

GattClientTest: rm double connectionChange verify

Bug: 311772251
Test: atest BumbleBluetoothTests
Change-Id: I78f773453016377e62f13eca46af0977de9a035e
Flag: TEST_ONLY
parent 8dc51c09
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -156,14 +156,10 @@ public class GattClientTest {

    @Test
    public void clientGattDiscoverServices() throws Exception {

        BluetoothGattCallback gattCallback = mock(BluetoothGattCallback.class);
        BluetoothGatt gatt = connectGattAndWaitConnection(gattCallback);

        try {
            verify(gattCallback, timeout(1000))
                    .onConnectionStateChange(any(), anyInt(), eq(BluetoothProfile.STATE_CONNECTED));

            gatt.discoverServices();
            verify(gattCallback, timeout(10000))
                    .onServicesDiscovered(any(), eq(BluetoothGatt.GATT_SUCCESS));
@@ -178,14 +174,10 @@ public class GattClientTest {

    @Test
    public void clientGattReadCharacteristics() throws Exception {

        BluetoothGattCallback gattCallback = mock(BluetoothGattCallback.class);
        BluetoothGatt gatt = connectGattAndWaitConnection(gattCallback);

        try {
            verify(gattCallback, timeout(1000))
                    .onConnectionStateChange(any(), anyInt(), eq(BluetoothProfile.STATE_CONNECTED));

            gatt.discoverServices();
            verify(gattCallback, timeout(10000))
                    .onServicesDiscovered(any(), eq(BluetoothGatt.GATT_SUCCESS));
@@ -212,9 +204,6 @@ public class GattClientTest {
        BluetoothGatt gatt = connectGattAndWaitConnection(gattCallback);

        try {
            verify(gattCallback, timeout(1000))
                    .onConnectionStateChange(any(), anyInt(), eq(BluetoothProfile.STATE_CONNECTED));

            gatt.discoverServices();
            verify(gattCallback, timeout(10000))
                    .onServicesDiscovered(any(), eq(BluetoothGatt.GATT_SUCCESS));