)]}'
{"ironic_python_agent/tests/unit/test_inspector.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"04cd072089538770b6fa4fe10dbdddf8ada464a9","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        self.assertEqual(1, mocked_sleep.call_count)"},{"line_number":484,"context_line":"        self.assertEqual(2, mocked_dispatch.call_count)"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    @mock.patch.object(inspector, \u0027_DHCP_RETRY_INTERVAL\u0027, 0.01)"},{"line_number":487,"context_line":"    def test_timeout(self, mocked_dispatch):"},{"line_number":488,"context_line":"        CONF.set_override(\u0027inspection_dhcp_all_interfaces\u0027, True)"},{"line_number":489,"context_line":"        CONF.set_override(\u0027inspection_dhcp_wait_timeout\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_6623b457","line":486,"updated":"2017-04-20 19:40:17.000000000","message":"this value is set to 2 in inspector.py. My guess is that they changed it to 0.01 to \u0027work\u0027 with the 0.02 value. I think we should change this back to 2 (ie, remove this mock), and change the test to mock the timing stuff if possible.\n\nThe code seems a bit odd though; inspector_dhcp_wait_timeout can be 0 too. And if it is set to 1, with _DHCP_RETRY_INTERVAL set to 2, it\u0027ll time out before trying again. But that isn\u0027t your problem...","commit_id":"818a9c785090f9a9fb0bdc4aa29c7133986d0eb8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"aef965c4f5347089219f7a55034541eb249f84f0","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        self.assertFalse(inspector.wait_for_dhcp())"},{"line_number":501,"context_line":"        mocked_dispatch.assert_called_with(\u0027list_network_interfaces\u0027)"},{"line_number":502,"context_line":"        mocked_sleep.assert_called_with(inspector._DHCP_RETRY_INTERVAL)"},{"line_number":503,"context_line":"        self.assertEqual(1, mocked_sleep.call_count)"},{"line_number":504,"context_line":"        # time.time() was called 3 times explicitly in wait_for_dhcp(),"},{"line_number":505,"context_line":"        # and 1 in LOG.warning()"},{"line_number":506,"context_line":"        self.assertEqual(4, mocked_time.call_count)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_234525b4","line":503,"updated":"2017-04-24 20:16:45.000000000","message":"nit: I think you can combine the above two lines with mock_sleep.assert_called_once_with(inspector._DHCP_RETRY_INTERVAL)","commit_id":"915aac85def3a4008d0c213785e7f785e4a43a52"},{"author":{"_account_id":13294,"name":"Javier Peña","email":"jpena@redhat.com","username":"jpena"},"change_message_id":"f41a6b4687d1fb4fd3848ca9220e7828313fd550","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        self.assertFalse(inspector.wait_for_dhcp())"},{"line_number":501,"context_line":"        mocked_dispatch.assert_called_with(\u0027list_network_interfaces\u0027)"},{"line_number":502,"context_line":"        mocked_sleep.assert_called_with(inspector._DHCP_RETRY_INTERVAL)"},{"line_number":503,"context_line":"        self.assertEqual(1, mocked_sleep.call_count)"},{"line_number":504,"context_line":"        # time.time() was called 3 times explicitly in wait_for_dhcp(),"},{"line_number":505,"context_line":"        # and 1 in LOG.warning()"},{"line_number":506,"context_line":"        self.assertEqual(4, mocked_time.call_count)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_e2396541","line":503,"in_reply_to":"5ff73747_234525b4","updated":"2017-04-25 10:14:49.000000000","message":"Thanks! Fixed.","commit_id":"915aac85def3a4008d0c213785e7f785e4a43a52"}]}
