)]}'
{"nova/tests/functional/notification_sample_tests/test_instance.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"68d58d79960dbd4a96f854d660d1b86fac03d1f0","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        self.api.post_server_action(server[\u0027id\u0027], post)"},{"line_number":755,"context_line":"        mock_rebuild.side_effect \u003d _compute_resources_unavailable"},{"line_number":756,"context_line":"        self._wait_for_state_change(self.api, server, expected_status\u003d\u0027ERROR\u0027)"},{"line_number":757,"context_line":"        expected_notifications \u003d ["},{"line_number":758,"context_line":"            {\u0027event_type\u0027: \u0027instance-rebuild-error\u0027}"},{"line_number":759,"context_line":"        ]"},{"line_number":760,"context_line":"        self._verify_notifications("},{"line_number":761,"context_line":"            expected_notifications\u003dexpected_notifications,"},{"line_number":762,"context_line":"            notifications\u003dfake_notifier.VERSIONED_NOTIFICATIONS,"},{"line_number":763,"context_line":"            replacements\u003d{"},{"line_number":764,"context_line":"                \u0027reservation_id\u0027: server[\u0027reservation_id\u0027],"},{"line_number":765,"context_line":"                \u0027uuid\u0027: server[\u0027id\u0027]"},{"line_number":766,"context_line":"            }"},{"line_number":767,"context_line":"        )"},{"line_number":768,"context_line":""},{"line_number":769,"context_line":"    def _test_restore_server(self, server):"},{"line_number":770,"context_line":"        self.flags(reclaim_instance_interval\u003d30)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_8a7026de","line":767,"range":{"start_line":757,"start_character":0,"end_line":767,"end_character":9},"updated":"2017-07-26 12:30:29.000000000","message":"If the intention is to simply ignore the second notification then that can be simply done by removing the assert of the len(fake_notifier.VERSIONED_NOTIFICATIONS) but keeping the same _verify_notification() call. \n\nIn the other hand if we want this test to be independent from the order of the notifications or from the existence of compute.exception notification then I suggest to use the following logic:\n\nnotification \u003d _wait_for_notifications(\u0027instance.rebuild.error\u0027, 1)\nself._verify_notification(...)","commit_id":"6ba62b37cce3e2afc442006abd54d67598dbfcba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"52a4ec1be645d5116102d8547d8b3e17f9f7a3e4","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        mock_rebuild.side_effect \u003d _compute_resources_unavailable"},{"line_number":763,"context_line":"        self._wait_for_state_change(self.api, server, expected_status\u003d\u0027ERROR\u0027)"},{"line_number":764,"context_line":"        notification \u003d self._get_notifications(\u0027instance.rebuild.error\u0027)"},{"line_number":765,"context_line":"        self.assertEqual(1, len(notification))"},{"line_number":766,"context_line":"        self._verify_notification("},{"line_number":767,"context_line":"            \u0027instance-rebuild-error\u0027,"},{"line_number":768,"context_line":"            replacements\u003d{"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_ed3ba999","line":765,"updated":"2017-07-31 07:50:46.000000000","message":"This could still fail as you can get the second (compute.exception) notification. Just remove the assert on the len() or wait for both instance.rebuild.error and compute.exception.","commit_id":"6e9b60183cf1bc7f9474c88407f6eff2f9319b3a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d23e7c5ea2c7bab9e6937cb7f4a139de59a91aae","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        mock_rebuild.side_effect \u003d _compute_resources_unavailable"},{"line_number":763,"context_line":"        self._wait_for_state_change(self.api, server, expected_status\u003d\u0027ERROR\u0027)"},{"line_number":764,"context_line":"        notification \u003d self._get_notifications(\u0027instance.rebuild.error\u0027)"},{"line_number":765,"context_line":"        self.assertEqual(1, len(notification))"},{"line_number":766,"context_line":"        self._verify_notification("},{"line_number":767,"context_line":"            \u0027instance-rebuild-error\u0027,"},{"line_number":768,"context_line":"            replacements\u003d{"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_b95b9e85","line":765,"in_reply_to":"df3967d1_968789d8","updated":"2017-07-31 12:51:45.000000000","message":"By bad. I didn\u0027t noticed that you assert the returned notifications. This looks good now as is.","commit_id":"6e9b60183cf1bc7f9474c88407f6eff2f9319b3a"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"827ca5c475f40685910fe0cd41ce314270c392d7","unresolved":false,"context_lines":[{"line_number":762,"context_line":"        mock_rebuild.side_effect \u003d _compute_resources_unavailable"},{"line_number":763,"context_line":"        self._wait_for_state_change(self.api, server, expected_status\u003d\u0027ERROR\u0027)"},{"line_number":764,"context_line":"        notification \u003d self._get_notifications(\u0027instance.rebuild.error\u0027)"},{"line_number":765,"context_line":"        self.assertEqual(1, len(notification))"},{"line_number":766,"context_line":"        self._verify_notification("},{"line_number":767,"context_line":"            \u0027instance-rebuild-error\u0027,"},{"line_number":768,"context_line":"            replacements\u003d{"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_968789d8","line":765,"in_reply_to":"df3967d1_ed3ba999","updated":"2017-07-31 12:16:33.000000000","message":"But the self._get_notifications return only with the related, \u0027instance.rebuild.error\u0027 event type notifications, no?\nIn this time don\u0027t contains the compute.exception, because different type events. Or i think bad?","commit_id":"6e9b60183cf1bc7f9474c88407f6eff2f9319b3a"}]}
