ublox-at-cellular-interface_psm

Dependents:  

Files at this revision

API Documentation at this revision

Comitter:
mudassar0121
Date:
Wed Nov 20 12:59:14 2019 +0500
Parent:
38:c3ad075a347b
Child:
40:9299d6d117f1
Commit message:
Reboot modem after connection drop

Changed in this revision

TESTS/unit_tests/default/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TESTS/unit_tests/default/main.cpp	Mon Nov 11 13:01:25 2019 +0500
+++ b/TESTS/unit_tests/default/main.cpp	Wed Nov 20 12:59:14 2019 +0500
@@ -563,6 +563,7 @@
     do_ntp(interface);
     TEST_ASSERT(!connection_has_gone_down);
     drop_connection(interface);
+    interface->deinit();
 }
 
 #ifdef MBED_CONF_APP_ECHO_SERVER
@@ -603,6 +604,7 @@
 
     sock.close();
     drop_connection(interface);
+    interface->deinit();
     tr_debug("%d UDP packets of size up to %d byte(s) echoed successfully.",
              x, MBED_CONF_APP_UDP_MAX_PACKET_SIZE);
 }
@@ -715,6 +717,7 @@
     TEST_ASSERT(!connection_has_gone_down);
     sock.close();
     drop_connection(interface);
+    interface->deinit();
 }
 
 // Test UDP data exchange via the asynchronous sigio() mechanism
@@ -756,6 +759,7 @@
     sock.close();
 
     drop_connection(interface);
+    interface->deinit();
 
     tr_debug("%d UDP packets of size up to %d byte(s) echoed asynchronously and successfully.",
              x, MBED_CONF_APP_UDP_MAX_FRAG_PACKET_SIZE);
@@ -839,6 +843,7 @@
     TEST_ASSERT(!connection_has_gone_down);
     sock.close();
     drop_connection(interface);
+    interface->deinit();
 }
 
 // Test TCP data exchange via the asynchronous sigio() mechanism
@@ -878,6 +883,7 @@
     sock.close();
 
     drop_connection(interface);
+    interface->deinit();
 
     tr_debug("%d TCP packets of size up to %d byte(s) echoed asynchronously and successfully.",
              x, MBED_CONF_APP_TCP_MAX_PACKET_SIZE);
@@ -917,6 +923,7 @@
     }
 
     drop_connection(interface);
+    interface->deinit();
 }
 
 // Connect with credentials included in the connect request
@@ -927,6 +934,7 @@
                                    MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD) == 0);
     use_connection(interface);
     drop_connection(interface);
+    interface->deinit();
 }
 
 // Test with credentials preset
@@ -939,6 +947,7 @@
     TEST_ASSERT(interface->connect(MBED_CONF_APP_DEFAULT_PIN) == 0);
     use_connection(interface);
     drop_connection(interface);
+    interface->deinit();
 }
 
 // Test adding and using a SIM pin, then removing it, using the pending
@@ -991,6 +1000,7 @@
 
     // Put the SIM pin back to the correct value for any subsequent tests
     interface->set_sim_pin(MBED_CONF_APP_DEFAULT_PIN);
+    interface->deinit();
 }
 
 // Test adding and using a SIM pin, then removing it, using the immediate
@@ -1038,6 +1048,7 @@
 
     // Put the SIM pin back to the correct value for any subsequent tests
     interface->set_sim_pin(MBED_CONF_APP_DEFAULT_PIN);
+    interface->deinit();
 }
 
 // Test being able to connect with a local instance of the interface
@@ -1116,6 +1127,7 @@
                                    MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD) == 0);
 
     drop_connection(interface);
+    interface->deinit();
 }
 
 
@@ -1180,6 +1192,7 @@
                                    MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD) == 0);
 
     drop_connection(interface);
+    interface->deinit();
 }
 
 void test_edrx() {