)]}'
{"rally/cli/cliutils.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"53e546167c2e9f7f9ef4b181680ab87b12413b0d","unresolved":false,"context_lines":[{"line_number":684,"context_line":"            LOG.exception(\"Unexpected exception in CLI\")"},{"line_number":685,"context_line":"        else:"},{"line_number":686,"context_line":"            print(e)"},{"line_number":687,"context_line":"        if hasattr(e, \"error_code\"):"},{"line_number":688,"context_line":"            error_code \u003d e.error_code"},{"line_number":689,"context_line":"        else:"},{"line_number":690,"context_line":"            error_code \u003d 1"},{"line_number":691,"context_line":"        return error_code"},{"line_number":692,"context_line":"    except sqlalchemy.exc.OperationalError as e:"},{"line_number":693,"context_line":"        if logging.is_debug():"},{"line_number":694,"context_line":"            LOG.exception(\"Something went wrong with database\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_b483feca","line":691,"range":{"start_line":687,"start_character":8,"end_line":691,"end_character":25},"updated":"2017-11-06 11:18:49.000000000","message":"it can be simplified like:\n\n    return getattr(e, \"error_code\", 1)","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"28ffcada905cb3f9d6d122881bd48639b1786434","unresolved":false,"context_lines":[{"line_number":684,"context_line":"            LOG.exception(\"Unexpected exception in CLI\")"},{"line_number":685,"context_line":"        else:"},{"line_number":686,"context_line":"            print(e)"},{"line_number":687,"context_line":"        if hasattr(e, \"error_code\"):"},{"line_number":688,"context_line":"            error_code \u003d e.error_code"},{"line_number":689,"context_line":"        else:"},{"line_number":690,"context_line":"            error_code \u003d 1"},{"line_number":691,"context_line":"        return error_code"},{"line_number":692,"context_line":"    except sqlalchemy.exc.OperationalError as e:"},{"line_number":693,"context_line":"        if logging.is_debug():"},{"line_number":694,"context_line":"            LOG.exception(\"Something went wrong with database\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_828a04bc","line":691,"range":{"start_line":687,"start_character":8,"end_line":691,"end_character":25},"in_reply_to":"3f4b6375_b483feca","updated":"2017-11-06 13:02:01.000000000","message":"looks cool , thanks :)","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"53e546167c2e9f7f9ef4b181680ab87b12413b0d","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        return 1"},{"line_number":700,"context_line":"    except Exception:"},{"line_number":701,"context_line":"        print(\"Command failed, please check log for more info\")"},{"line_number":702,"context_line":"        return 1"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"def _generate_bash_completion_script():"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_7470e672","line":702,"range":{"start_line":702,"start_character":8,"end_line":702,"end_character":16},"updated":"2017-11-06 11:18:49.000000000","message":"raising an exception should return 1 exit code by default + it will print the original error (and traceback) which are really helpful. In your case, there is no logging of original error and debugging can become a real pain.","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"28ffcada905cb3f9d6d122881bd48639b1786434","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        return 1"},{"line_number":700,"context_line":"    except Exception:"},{"line_number":701,"context_line":"        print(\"Command failed, please check log for more info\")"},{"line_number":702,"context_line":"        return 1"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"def _generate_bash_completion_script():"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_3d1a516e","line":702,"range":{"start_line":702,"start_character":8,"end_line":702,"end_character":16},"in_reply_to":"3f4b6375_7470e672","updated":"2017-11-06 13:02:01.000000000","message":"ehh, my idea is to return values uniformly, but looks a wrong way .","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"}],"rally/cli/commands/task.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"53e546167c2e9f7f9ef4b181680ab87b12413b0d","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        return_value \u003d self._detailed(api, task_id\u003dtask_instance[\"uuid\"])"},{"line_number":314,"context_line":"        if return_value:"},{"line_number":315,"context_line":"            return 1"},{"line_number":316,"context_line":"        else:"},{"line_number":317,"context_line":"            return 0"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @cliutils.args(\"--uuid\", type\u003dstr, dest\u003d\"task_id\", help\u003d\"UUID of task.\")"},{"line_number":320,"context_line":"    @envutils.with_default_task_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_d4c9daab","line":317,"range":{"start_line":316,"start_character":0,"end_line":317,"end_character":20},"updated":"2017-11-06 11:18:49.000000000","message":"0 is returned by default, so these lines are redundant.","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"28ffcada905cb3f9d6d122881bd48639b1786434","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        return_value \u003d self._detailed(api, task_id\u003dtask_instance[\"uuid\"])"},{"line_number":314,"context_line":"        if return_value:"},{"line_number":315,"context_line":"            return 1"},{"line_number":316,"context_line":"        else:"},{"line_number":317,"context_line":"            return 0"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @cliutils.args(\"--uuid\", type\u003dstr, dest\u003d\"task_id\", help\u003d\"UUID of task.\")"},{"line_number":320,"context_line":"    @envutils.with_default_task_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_e2f4185d","line":317,"range":{"start_line":316,"start_character":0,"end_line":317,"end_character":20},"in_reply_to":"3f4b6375_d4c9daab","updated":"2017-11-06 13:02:01.000000000","message":"agree :)","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"53e546167c2e9f7f9ef4b181680ab87b12413b0d","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                   help\u003d\"Print detailed results for each iteration.\")"},{"line_number":352,"context_line":"    @envutils.with_default_task_id"},{"line_number":353,"context_line":"    def detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":354,"context_line":"        return_value \u003d self._detailed(api, task_id, iterations_data)"},{"line_number":355,"context_line":"        if return_value \u003d\u003d 1:"},{"line_number":356,"context_line":"            return 1"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            return 0"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":361,"context_line":"        \"\"\"Print detailed information about given task.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_14d41247","line":358,"range":{"start_line":354,"start_character":8,"end_line":358,"end_character":20},"updated":"2017-11-06 11:18:49.000000000","message":"`rally task detailed` runs nothing. It\u0027s purpose is displaying detailed results of the task. 1 exit code means that the error occurred while displaying results. In other words, it should not return 1 in case of SLA failures.\n\nIf you want to obtain \"error exit code\" after launching task, use `rally task sla-check` command.\n\nPS: the condition of L355 is wrong, detailed method never return 1","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"28ffcada905cb3f9d6d122881bd48639b1786434","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                   help\u003d\"Print detailed results for each iteration.\")"},{"line_number":352,"context_line":"    @envutils.with_default_task_id"},{"line_number":353,"context_line":"    def detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":354,"context_line":"        return_value \u003d self._detailed(api, task_id, iterations_data)"},{"line_number":355,"context_line":"        if return_value \u003d\u003d 1:"},{"line_number":356,"context_line":"            return 1"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            return 0"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":361,"context_line":"        \"\"\"Print detailed information about given task.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_e2665851","line":358,"range":{"start_line":354,"start_character":8,"end_line":358,"end_character":20},"in_reply_to":"3f4b6375_14d41247","updated":"2017-11-06 13:02:01.000000000","message":"Thank you for reviews. When there is SLA failures, function _detailed() will return -1 , so start() will return 1 and detail() will return 0 because(-1 \u003d! 1), Am I right ? :)","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"759b9f7e731cb16ed8eb6d81b6d3937e30172536","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                   help\u003d\"Print detailed results for each iteration.\")"},{"line_number":352,"context_line":"    @envutils.with_default_task_id"},{"line_number":353,"context_line":"    def detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":354,"context_line":"        return_value \u003d self._detailed(api, task_id, iterations_data)"},{"line_number":355,"context_line":"        if return_value \u003d\u003d 1:"},{"line_number":356,"context_line":"            return 1"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            return 0"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":361,"context_line":"        \"\"\"Print detailed information about given task.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_726a1aed","line":358,"range":{"start_line":354,"start_character":8,"end_line":358,"end_character":20},"in_reply_to":"3f4b6375_b238929f","updated":"2017-11-07 15:26:16.000000000","message":"If the task is not found, L364 should raise an error (L366-368 look redundant) and cliutils automatically will return 1 exit code","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"7b4325c2e596970ff913c4dea01041efeab7ffa7","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                   help\u003d\"Print detailed results for each iteration.\")"},{"line_number":352,"context_line":"    @envutils.with_default_task_id"},{"line_number":353,"context_line":"    def detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":354,"context_line":"        return_value \u003d self._detailed(api, task_id, iterations_data)"},{"line_number":355,"context_line":"        if return_value \u003d\u003d 1:"},{"line_number":356,"context_line":"            return 1"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            return 0"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":361,"context_line":"        \"\"\"Print detailed information about given task.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_b238929f","line":358,"range":{"start_line":354,"start_character":8,"end_line":358,"end_character":20},"in_reply_to":"3f4b6375_bd6d21cd","updated":"2017-11-07 14:58:08.000000000","message":"if the task is not found , is detail() appropriate to return 0 ?","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"eecab3fb265d4a408d6fc397dc52c597e2a65d8e","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                   help\u003d\"Print detailed results for each iteration.\")"},{"line_number":352,"context_line":"    @envutils.with_default_task_id"},{"line_number":353,"context_line":"    def detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":354,"context_line":"        return_value \u003d self._detailed(api, task_id, iterations_data)"},{"line_number":355,"context_line":"        if return_value \u003d\u003d 1:"},{"line_number":356,"context_line":"            return 1"},{"line_number":357,"context_line":"        else:"},{"line_number":358,"context_line":"            return 0"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def _detailed(self, api, task_id\u003dNone, iterations_data\u003dFalse):"},{"line_number":361,"context_line":"        \"\"\"Print detailed information about given task.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_bd6d21cd","line":358,"range":{"start_line":354,"start_character":8,"end_line":358,"end_character":20},"in_reply_to":"3f4b6375_e2665851","updated":"2017-11-06 13:06:37.000000000","message":"yes, you are right. But since there is no case when L355 can be applied, you can just call self._detailed without checking what it returns and without returning any values from detailed method","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"53e546167c2e9f7f9ef4b181680ab87b12413b0d","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                    output[idx].add_iteration(additive[\"data\"])"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"                if itr.get(\"error\"):"},{"line_number":450,"context_line":"                    got_error \u003d True"},{"line_number":451,"context_line":"                    task_errors.append(TaskCommands._format_task_error(itr))"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"            self._print_task_errors(task_id, task_errors)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f4b6375_54484a5a","line":450,"range":{"start_line":450,"start_character":20,"end_line":450,"end_character":36},"updated":"2017-11-06 11:18:49.000000000","message":"failed iteration doesn\u0027t mean an error. Rally Framework allows performing different kinds of testing and with combination with hooks, several failed iterations can be ok. \n\nThe only one source of truth of status of the task is it\u0027s \"pass_sla\" property.","commit_id":"3633a61325e7d7d6999bedffcaedbc07e1184841"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9535b6d6b14a156a25255b277ca9dd633f087280","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        print(\"\\trally task report %s --json --out output.json\\n\" %"},{"line_number":517,"context_line":"              task[\"uuid\"])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        if not task[\"pass_sla\"]:"},{"line_number":520,"context_line":"            return 1"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    @cliutils.args(\"--uuid\", type\u003dstr, dest\u003d\"task_id\", help\u003d\"UUID of task.\")"},{"line_number":523,"context_line":"    @envutils.with_default_task_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f485f77_9bc57f91","line":520,"range":{"start_line":519,"start_character":8,"end_line":520,"end_character":20},"updated":"2017-11-11 10:24:55.000000000","message":"It is unclear from the output that command fails due to SLA, let\u0027s print something like \"The task is failed due to one of the SLA criteria(s).\"","commit_id":"21e85fbb4f2bb4ff914eeb213dc64b21ef1bd10b"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"155f4a4b4d69064a83726182b9e9a2adab5803ae","unresolved":false,"context_lines":[{"line_number":517,"context_line":"              task[\"uuid\"])"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        if not task[\"pass_sla\"]:"},{"line_number":520,"context_line":"            print(\"Task failed: The task is failed due to \""},{"line_number":521,"context_line":"                  \"one of the SLA criterial(s)\\n\")"},{"line_number":522,"context_line":"            return 1"},{"line_number":523,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f485f77_7c34c6fb","line":520,"range":{"start_line":520,"start_character":19,"end_line":520,"end_character":50},"updated":"2017-11-14 10:31:23.000000000","message":"The tautology. Just write:\n\n    One or several workloads do not pass it\u0027s SLA criteria.","commit_id":"1c9db75cb15e963fc1890caef93e9f7515b95ad4"}],"tests/functional/test_cli_task.py":[{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"18630982b62dbd9bcb0c0416c51313f0bfc29620","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        rally \u003d utils.Rally()"},{"line_number":100,"context_line":"        cfg \u003d self._get_sample_task_config()"},{"line_number":101,"context_line":"        config \u003d utils.TaskConfig(cfg)"},{"line_number":102,"context_line":"        self.assertRaises(utils.RallyCliError, rally,"},{"line_number":103,"context_line":"                          \"task start --task %s\" % config.filename)"},{"line_number":104,"context_line":"        self.assertIn(\"finished\", rally(\"task status\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def test_detailed(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_a2cc7d89","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":67},"updated":"2017-11-13 10:16:07.000000000","message":"Please check why the exception was raised.\nAlso, we should add another test case if making an exception test.","commit_id":"2f2f98f29cf1994658952a5828ca92c80922a5cd"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"e981bcb818179691dc3624ed4e0f14ebe52e1041","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        rally \u003d utils.Rally()"},{"line_number":100,"context_line":"        cfg \u003d self._get_sample_task_config()"},{"line_number":101,"context_line":"        config \u003d utils.TaskConfig(cfg)"},{"line_number":102,"context_line":"        self.assertRaises(utils.RallyCliError, rally,"},{"line_number":103,"context_line":"                          \"task start --task %s\" % config.filename)"},{"line_number":104,"context_line":"        self.assertIn(\"finished\", rally(\"task status\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def test_detailed(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_3ead3031","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":67},"in_reply_to":"1f485f77_1bee1822","updated":"2017-11-14 00:02:53.000000000","message":"no, i think we should use other scenario instead of current scenario Dummy.dummy_random_fail_in_atomic","commit_id":"2f2f98f29cf1994658952a5828ca92c80922a5cd"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"e0033f2c2ffa989136643fbcc973f42180b5bfdd","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        rally \u003d utils.Rally()"},{"line_number":100,"context_line":"        cfg \u003d self._get_sample_task_config()"},{"line_number":101,"context_line":"        config \u003d utils.TaskConfig(cfg)"},{"line_number":102,"context_line":"        self.assertRaises(utils.RallyCliError, rally,"},{"line_number":103,"context_line":"                          \"task start --task %s\" % config.filename)"},{"line_number":104,"context_line":"        self.assertIn(\"finished\", rally(\"task status\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def test_detailed(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_fd979d8f","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":67},"in_reply_to":"1f485f77_3ead3031","updated":"2017-11-14 01:30:45.000000000","message":"use Dummy.dummy_random_action? I\u0027m not familiar with these use cases so I\u0027m not sure if the change scenario will affect the content that he was going to measure. : )","commit_id":"2f2f98f29cf1994658952a5828ca92c80922a5cd"},{"author":{"_account_id":26025,"name":"chenxu","email":"xuchen1990xx@gmail.com","username":"chenxu"},"change_message_id":"9f89ca9b280da34a35c8b381c928c069cfbc1714","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        rally \u003d utils.Rally()"},{"line_number":100,"context_line":"        cfg \u003d self._get_sample_task_config()"},{"line_number":101,"context_line":"        config \u003d utils.TaskConfig(cfg)"},{"line_number":102,"context_line":"        self.assertRaises(utils.RallyCliError, rally,"},{"line_number":103,"context_line":"                          \"task start --task %s\" % config.filename)"},{"line_number":104,"context_line":"        self.assertIn(\"finished\", rally(\"task status\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def test_detailed(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_1bee1822","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":67},"in_reply_to":"1f485f77_a2cc7d89","updated":"2017-11-13 11:00:33.000000000","message":"\u0027rally task start`\u0027 will returns 1 in case of SLA failure. so we should catch an exception here. :)","commit_id":"2f2f98f29cf1994658952a5828ca92c80922a5cd"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"155f4a4b4d69064a83726182b9e9a2adab5803ae","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        rally \u003d utils.Rally()"},{"line_number":100,"context_line":"        cfg \u003d self._get_sample_task_config()"},{"line_number":101,"context_line":"        config \u003d utils.TaskConfig(cfg)"},{"line_number":102,"context_line":"        self.assertRaises(utils.RallyCliError, rally,"},{"line_number":103,"context_line":"                          \"task start --task %s\" % config.filename)"},{"line_number":104,"context_line":"        self.assertIn(\"finished\", rally(\"task status\"))"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def test_detailed(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f485f77_fc71d6df","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":67},"in_reply_to":"1f485f77_fd979d8f","updated":"2017-11-14 10:31:23.000000000","message":"I do not remember actual historical reasons, but assume that `Dummy.dummy_random_fail_in_atomic` was used to produce different kind of iterations(failed/success) at once and check different printing and so on. \n\nSince in Rally \u003c 0.10 there were not default SLA criteries, this workload was successful.\n\nWrapping all tests with self.assertRaises is not a solution because it adds an overhead with checking (the output of an exception should be checked to not miss the failure by not-SLA fault) + all these tests don\u0027t designed for \"failed\" calls.\n\nI suppose that solution will be adding SLA criteria \"failure_rate\": {\"max\": 100} to workload from _get_sample_task_config. It will fix most of the tests without changing their behavior. Plus, we need to add a new test(if it missed) which will not pass sla and check output of an error there:\n\n    e \u003d self.assertRaises(utils.RallyCliError, rally, \"task start --task %s\" % config.filename)\n    self.assertIn(\"The task is failed due to \"\n                  \"one of the SLA criterial(s)\", e.output)","commit_id":"2f2f98f29cf1994658952a5828ca92c80922a5cd"}]}
