From 19f7ba75850c52e1ae163766b64b6d153e8d7e1b Mon Sep 17 00:00:00 2001 From: dongwenjuan Date: Mon, 14 Aug 2017 16:58:13 +0800 Subject: refactor failure inject JIRA: DOCTOR-116 Change-Id: I14deda4ccb47414cff139a522a9196b68e92500e Signed-off-by: dongwenjuan --- tests/consumer/sample.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/consumer') diff --git a/tests/consumer/sample.py b/tests/consumer/sample.py index a698623a..20ad9d57 100644 --- a/tests/consumer/sample.py +++ b/tests/consumer/sample.py @@ -55,9 +55,9 @@ class ConsumerApp(Thread): @app.route('/failure', methods=['POST']) def event_posted(): self.log.info('doctor consumer notified at %s' % time.time()) - self.log.info('received data = %s' % request.data) - data = json.loads(request.data) - return "OK" + self.log.info('sample consumer received data = %s' % request.data) + data = json.loads(request.data.decode('utf8')) + return 'OK' @app.route('/shutdown', methods=['POST']) def shutdown(): -- cgit 1.2.3-korg