From 7580f94cb18489cd5b6fdaa9e3c83a6ff0720b1a Mon Sep 17 00:00:00 2001 From: valluriraj Date: Tue, 15 Sep 2020 17:52:00 -0700 Subject: [PATCH] Central monitor events IT fix (#252) --- azext_iot/tests/test_iot_central_int.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azext_iot/tests/test_iot_central_int.py b/azext_iot/tests/test_iot_central_int.py index 6f17cd28f..335af0eee 100644 --- a/azext_iot/tests/test_iot_central_int.py +++ b/azext_iot/tests/test_iot_central_int.py @@ -103,6 +103,8 @@ def test_central_monitor_events_deprecated(self): device_client = helpers.dps_connect_device(device_id, credentials) + enqueued_time = utility.calculate_millisec_since_unix_epoch_utc() - 10000 + payload = {"Bool": True} msg = Message( data=json.dumps(payload), @@ -111,8 +113,6 @@ def test_central_monitor_events_deprecated(self): ) device_client.send_message(msg) - enqueued_time = utility.calculate_millisec_since_unix_epoch_utc() - 10000 - # Test with invalid app-id self.cmd( "iot central app monitor-events --app-id {} -y".format(APP_ID + "zzz"), @@ -134,6 +134,8 @@ def test_central_monitor_events(self): device_client = helpers.dps_connect_device(device_id, credentials) + enqueued_time = utility.calculate_millisec_since_unix_epoch_utc() - 10000 + payload = {"Bool": True} msg = Message( data=json.dumps(payload), @@ -142,8 +144,6 @@ def test_central_monitor_events(self): ) device_client.send_message(msg) - enqueued_time = utility.calculate_millisec_since_unix_epoch_utc() - 10000 - # Test with invalid app-id self.cmd( "iot central diagnostics monitor-events --app-id {} -y".format(