Skip to content

Commit 0c8e5f2

Browse files
committed
Linux: robuster test timing
1 parent cc2ac04 commit 0c8e5f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java-does-usb/src/test/java/net/codecrete/usb/TestDeviceBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static void resetBuffers() {
8686
static void drainData(int endpointNumber) {
8787
while (true) {
8888
try {
89-
testDevice.transferIn(endpointNumber, 1);
89+
testDevice.transferIn(endpointNumber, 2);
9090
} catch (UsbTimeoutException e) {
9191
break;
9292
}

java-does-usb/src/test/java/net/codecrete/usb/TimeoutTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class TimeoutTest extends TestDeviceBase {
2323

2424
@Test
25-
@Timeout(value = 1, unit = TimeUnit.SECONDS)
25+
@Timeout(value = 2, unit = TimeUnit.SECONDS)
2626
void bulkTransferIn_timesOut() {
2727
var endpointIn = config.endpointLoopbackIn();
2828
assertThrows(UsbTimeoutException.class, () -> testDevice.transferIn(endpointIn, 200));

0 commit comments

Comments
 (0)