From a4a3b3d42930c1fcd3612e9aa201bd1cbda26dc1 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Fri, 26 Oct 2018 11:12:55 -0500 Subject: [PATCH] Remove USB disconnect delay from Serial test Remove the USB disconnect delay since there is no reason this is needed. Failures which occur without this indicate a device or host problem. --- TESTS/usb_device/serial/main.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/TESTS/usb_device/serial/main.cpp b/TESTS/usb_device/serial/main.cpp index 20f9c3f161..a356595003 100644 --- a/TESTS/usb_device/serial/main.cpp +++ b/TESTS/usb_device/serial/main.cpp @@ -56,10 +56,6 @@ #define SERIAL_LOOPBACK_REPS 100 #define USB_RECONNECT_DELAY_MS 1 -// Additional delay necessary for Windows hosts -// to handle the reconnect operation correctly. -#define USB_DISCONNECT_DELAY_MS 1 - #define LINE_CODING_STRLEN 13 // 6 + 2 + 1 + 1 + 3 * comma #define USB_DEV_SN_LEN (32) // 32 hex digit UUID @@ -283,7 +279,6 @@ void test_cdc_usb_reconnect() TEST_ASSERT_TRUE(usb_cdc.configured()); TEST_ASSERT_TRUE(usb_cdc.ready()); - wait_ms(USB_DISCONNECT_DELAY_MS); // Disconnect the USB device. usb_cdc.disconnect(); TEST_ASSERT_FALSE(usb_cdc.configured()); @@ -305,7 +300,6 @@ void test_cdc_usb_reconnect() TEST_ASSERT_TRUE(usb_cdc.configured()); TEST_ASSERT_TRUE(usb_cdc.ready()); - wait_ms(USB_DISCONNECT_DELAY_MS); // Disconnect the USB device again. usb_cdc.disconnect(); TEST_ASSERT_FALSE(usb_cdc.configured()); @@ -525,7 +519,6 @@ void test_serial_usb_reconnect() TEST_ASSERT_EQUAL_INT(0, usb_serial.readable()); // Disconnect the USB device. - wait_ms(USB_DISCONNECT_DELAY_MS); usb_serial.disconnect(); TEST_ASSERT_FALSE(usb_serial.configured()); TEST_ASSERT_FALSE(usb_serial.connected()); @@ -552,7 +545,6 @@ void test_serial_usb_reconnect() TEST_ASSERT_EQUAL_INT(0, usb_serial.readable()); // Disconnect the USB device again. - wait_ms(USB_DISCONNECT_DELAY_MS); usb_serial.disconnect(); TEST_ASSERT_FALSE(usb_serial.configured()); TEST_ASSERT_FALSE(usb_serial.connected());