We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b2ec25 + 896bc44 commit e4b3603Copy full SHA for e4b3603
TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp
@@ -30,6 +30,7 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
30
rtos::Semaphore semaphore;
31
dns_application_data data;
32
data.semaphore = &semaphore;
33
+ data.result = NSAPI_ERROR_TIMEOUT;
34
35
nsapi_dns_reset();
36
@@ -49,7 +50,9 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
49
50
TEST_ASSERT(strlen(addr.get_ip_address()) > 1);
51
}
52
- semaphore.try_acquire_for(100);
53
+ if (!semaphore.try_acquire_for(1000)) {
54
+ get_interface()->gethostbyname_async_cancel(err);
55
+ }
56
57
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, data.result);
58
0 commit comments