From 7132c136e751ec36ea4710b4141464fcb653efd6 Mon Sep 17 00:00:00 2001 From: Ian Craggs Date: Mon, 9 Feb 2015 13:31:12 +0000 Subject: [PATCH] Lengthen some timeouts in test1 --- test/test1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test1.c b/test/test1.c index b0e18e78..141d6dae 100644 --- a/test/test1.c +++ b/test/test1.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2014 IBM Corp. + * Copyright (c) 2009, 2015 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -313,11 +313,11 @@ void test1_sendAndReceive(MQTTClient* c, int qos, char* test_topic) if (qos > 0) { - rc = MQTTClient_waitForCompletion(c, dt, 1000L); + rc = MQTTClient_waitForCompletion(c, dt, 5000L); assert("Good rc from waitforCompletion", rc == MQTTCLIENT_SUCCESS, "rc was %d", rc); } - rc = MQTTClient_receive(c, &topicName, &topicLen, &m, 1000); + rc = MQTTClient_receive(c, &topicName, &topicLen, &m, 5000); assert("Good rc from receive", rc == MQTTCLIENT_SUCCESS, "rc was %d", rc); if (topicName) { @@ -337,13 +337,13 @@ void test1_sendAndReceive(MQTTClient* c, int qos, char* test_topic) } /* receive any outstanding messages */ - MQTTClient_receive(c, &topicName, &topicLen, &m, 1000); + MQTTClient_receive(c, &topicName, &topicLen, &m, 2000); while (topicName) { printf("Message received on topic %s is %.*s.\n", topicName, m->payloadlen, (char*)(m->payload)); MQTTClient_free(topicName); MQTTClient_freeMessage(&m); - MQTTClient_receive(c, &topicName, &topicLen, &m, 1000); + MQTTClient_receive(c, &topicName, &topicLen, &m, 2000); } }