diff --git a/iotclient/iot_client.py b/iotclient/iot_client.py index b6968e2..1dbc012 100644 --- a/iotclient/iot_client.py +++ b/iotclient/iot_client.py @@ -287,11 +287,16 @@ def test_script(argv): command = "dummy" test_script(sys.argv[1:]) i = 0 -while (command.lower() not in ["exit", "quit", "end"]): +j = 0 +while (command.lower() not in ["exit", "quit", "end"] and j < 3): try: if testscriptData[0] and i < testscriptData[1]: command = testCommands[i] + if (command.lower() == "exit" and j < 3): + i = 1 + j += 1 + command = testCommands[i] if i > 0: time.sleep(random.randrange(1, 5)) print(datetime.now())