Skip to content

Commit 1630883

Browse files
committed
Tests: USB: Increase serial open retries
Double the number of attempts that are made to open a serial port. This makes tests run more reliably on Windows.
1 parent ee4b5dd commit 1630883

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

TESTS/host_tests/usb_device_serial.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def port_open_wait(self):
137137
retry_delay=0.05)
138138
retry_fun_call(
139139
fun=mbed_serial.open,
140-
num_retries=10,
140+
num_retries=20,
141141
retry_delay=0.05)
142142
mbed_serial.dtr = True
143143
try:
@@ -159,7 +159,7 @@ def port_open_close(self):
159159
retry_delay=0.05)
160160
retry_fun_call(
161161
fun=mbed_serial.open,
162-
num_retries=10,
162+
num_retries=20,
163163
retry_delay=0.05)
164164
mbed_serial.reset_output_buffer()
165165
mbed_serial.dtr = True
@@ -184,7 +184,7 @@ def send_data_sequence(self, chunk_size=1):
184184
retry_delay=0.05)
185185
retry_fun_call(
186186
fun=mbed_serial.open,
187-
num_retries=10,
187+
num_retries=20,
188188
retry_delay=0.05)
189189
except RetryError as exc:
190190
self.log('TEST ERROR: {}'.format(exc))
@@ -220,7 +220,7 @@ def loopback(self):
220220
retry_delay=0.05)
221221
retry_fun_call(
222222
fun=mbed_serial.open,
223-
num_retries=10,
223+
num_retries=20,
224224
retry_delay=0.05)
225225
except RetryError as exc:
226226
self.log('TEST ERROR: {}'.format(exc))
@@ -257,7 +257,7 @@ def change_line_coding(self):
257257
retry_delay=0.05)
258258
retry_fun_call(
259259
fun=mbed_serial.open,
260-
num_retries=10,
260+
num_retries=20,
261261
retry_delay=0.05)
262262
except RetryError as exc:
263263
self.log('TEST ERROR: {}'.format(exc))

0 commit comments

Comments
 (0)