From 1027b08e809ed3cb82365ff53e76144849ba5f7c Mon Sep 17 00:00:00 2001 From: Gus Class Date: Thu, 6 Feb 2020 10:52:42 -0800 Subject: [PATCH 1/2] Adds check for missing gateway ID on gateway commands --- iot/api-client/mqtt_example/cloudiot_mqtt_example.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_example.py b/iot/api-client/mqtt_example/cloudiot_mqtt_example.py index 717d8d16e71..1d542328e7d 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_example.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_example.py @@ -482,6 +482,11 @@ def mqtt_device_demo(args): def main(): args = parse_command_line_args() + if args.command.startswith('gateway'): + if (args.gateway_id is None): + print('Error: For gateway commands you must specify a gateway ID') + return + if args.command == 'gateway_listen': listen_for_messages( args.service_account_json, args.project_id, From 2150beba530b1c4ac96e2fd93a297d3d3eebda8c Mon Sep 17 00:00:00 2001 From: Gus Class Date: Thu, 6 Feb 2020 11:24:25 -0800 Subject: [PATCH 2/2] Adds back flaky directive --- iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py index f5bcb043275..32b99b62b74 100644 --- a/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py +++ b/iot/api-client/mqtt_example/cloudiot_mqtt_example_test.py @@ -280,6 +280,7 @@ def test_gateway_listen_for_bound_device_configs(test_topic, capsys): assert 'Received message' in out +@flaky def test_gateway_send_data_for_device(test_topic, capsys): gateway_id = device_id_template.format('RS256') device_id = device_id_template.format('noauthbind')