From 631c3f99f0e499edd1adcbc7550dd3d0de393e31 Mon Sep 17 00:00:00 2001 From: dongwenjuan Date: Tue, 20 Mar 2018 15:13:14 +0800 Subject: optimize the fault notification test Change-Id: I47572b4515049c49f9aa04bf7984757779a605f3 Signed-off-by: dongwenjuan --- doctor_tests/consumer/sample.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doctor_tests/consumer/sample.py') diff --git a/doctor_tests/consumer/sample.py b/doctor_tests/consumer/sample.py index eaf5fabd..c7dcf4f9 100644 --- a/doctor_tests/consumer/sample.py +++ b/doctor_tests/consumer/sample.py @@ -54,7 +54,9 @@ class ConsumerApp(Thread): @app.route('/failure', methods=['POST']) def event_posted(): - self.log.info('doctor consumer notified at %s' % time.time()) + notified_time = time.time() + self.log.info('doctor consumer notified at %s' % notified_time) + self.consumer.notified_time = notified_time data = json.loads(request.data.decode('utf8')) self.log.info('sample consumer received data = %s' % data) return 'OK' -- cgit 1.2.3-korg