mirror of
https://github.com/revanced/jadb.git
synced 2025-06-12 05:07:39 +02:00
Fixing a bug where jadb would hang if no devices where found.
This commit is contained in:
@ -6,8 +6,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import se.vidstige.jadb.JadbConnection;
|
||||
import se.vidstige.jadb.JadbDevice;
|
||||
import se.vidstige.jadb.server.AdbServer;
|
||||
import se.vidstige.jadb.server.SocketServer;
|
||||
import se.vidstige.jadb.test.fakes.FakeAdbServer;
|
||||
|
||||
import java.util.List;
|
||||
@ -36,4 +34,11 @@ public class MockedTestCases {
|
||||
List<JadbDevice> devices = connection.getDevices();
|
||||
Assert.assertEquals("serial-123", devices.get(0).getSerial());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListNoDevices() throws Exception {
|
||||
List<JadbDevice> devices = connection.getDevices();
|
||||
Assert.assertEquals(0, devices.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user