summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-07 16:18:43 +0000
committerGerrit Code Review <review@openstack.org>2019-03-07 16:18:43 +0000
commit6a9d02983430cd2cad7b21d13cf21ff874e1e8ce (patch)
treef5aeaf3e0b3cc06353d8efc05a491a00d42dfaa8
parentaffc25d189feff6072d16408f914bf5703dfd13c (diff)
parent81f41775591627fc15d319f39126d37a1f7dca13 (diff)
Merge "Report the build execute_time via mqtt"
-rw-r--r--tests/unit/test_connection.py1
-rw-r--r--zuul/driver/mqtt/mqttreporter.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test_connection.py b/tests/unit/test_connection.py
index 85ad758..d395cc8 100644
--- a/tests/unit/test_connection.py
+++ b/tests/unit/test_connection.py
@@ -492,6 +492,7 @@ class TestMQTTConnection(ZuulTestCase):
492 'test') 492 'test')
493 self.assertEquals(mqtt_payload['buildset']['builds'][0]['result'], 493 self.assertEquals(mqtt_payload['buildset']['builds'][0]['result'],
494 'SUCCESS') 494 'SUCCESS')
495 self.assertIn('execute_time', mqtt_payload['buildset']['builds'][0])
495 self.assertIn('timestamp', mqtt_payload) 496 self.assertIn('timestamp', mqtt_payload)
496 self.assertIn('enqueue_time', mqtt_payload) 497 self.assertIn('enqueue_time', mqtt_payload)
497 498
diff --git a/zuul/driver/mqtt/mqttreporter.py b/zuul/driver/mqtt/mqttreporter.py
index 75af2d3..30dff59 100644
--- a/zuul/driver/mqtt/mqttreporter.py
+++ b/zuul/driver/mqtt/mqttreporter.py
@@ -61,6 +61,7 @@ class MQTTReporter(BaseReporter):
61 'uuid': build.uuid, 61 'uuid': build.uuid,
62 'start_time': build.start_time, 62 'start_time': build.start_time,
63 'end_time': build.end_time, 63 'end_time': build.end_time,
64 'execute_time': build.execute_time,
64 'log_url': url, 65 'log_url': url,
65 'result': result, 66 'result': result,
66 }) 67 })