diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-08-14 16:58:13 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-09-04 22:30:39 +0800 |
commit | 19f7ba75850c52e1ae163766b64b6d153e8d7e1b (patch) | |
tree | f76b13d9d9092209788624609f65872ca8d0dea5 /tests/consumer | |
parent | 836a8932d6c6a502980009b9578f0c6ecf64cb47 (diff) |
refactor failure inject
JIRA: DOCTOR-116
Change-Id: I14deda4ccb47414cff139a522a9196b68e92500e
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/consumer')
-rw-r--r-- | tests/consumer/sample.py | 6 |
1 files changed, 3 insertions, 3 deletions
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(): |