Add delay between setup and startPersistentSession
@@ -1381,6 +1381,12 @@ TEST( coreMQTT_Integration, test_MQTT_Restore_Session_Incoming_Duplicate_PubRel
*/
void test_MQTT_Resend_Unacked_Publish_QoS1( void )
{
+ if( testingAgainstAWS )
+ {
+ /* Add 30 seconds of delay */
+ Clock_SleepMs( 30000 );
+ }
+
/* Start a persistent session with the broker. */
startPersistentSession();
@@ -1410,6 +1416,12 @@ void test_MQTT_Resend_Unacked_Publish_QoS1( void )
/* Reset the transport receive function in the context. */
context.transportInterface.recv = Openssl_Recv;
+ if( testingAgainstAWS )
+ {
+ /* Add 30 seconds of delay */
+ Clock_SleepMs( 30000 );
+ }
+
/* We will re-establish an MQTT over TLS connection with the broker to restore
* the persistent session. */
resumePersistentSession();
@@ -1534,6 +1546,12 @@ TEST( coreMQTT_Integration, test_MQTT_Resend_Unacked_Publish_QoS2 )
*/
void test_MQTT_Restore_Session_Duplicate_Incoming_Publish_Qos1( void )
{
+ if( testingAgainstAWS )
+ {
+ /* Add 30 seconds of delay */
+ Clock_SleepMs( 30000 );
+ }
+
/* Start a persistent session with the broker. */
startPersistentSession();
