)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"80afe34e6049f0a13cf5447941cd4531139b9d65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"436806de_1a9129c7","updated":"2025-03-03 21:46:30.000000000","message":"Marking WIP since I want to run tests multiple times to verify","commit_id":"e231b2bb34edb61cce861b724ae6df1e3d8ea7a1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f847976a23597174b585601fc82504da242a94ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"027ebdb1_f048efa7","updated":"2025-03-04 15:54:33.000000000","message":"recheck get logs to verify #1","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a7216721d99b7426fdcc09d860830a5897e606fa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b6971c94_a7881e33","updated":"2025-03-04 21:06:36.000000000","message":"recheck get logs to verify #2","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c42dbf13b6e9a9a32d3e9a02b488a1aff95042a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4ece0190_d83b93cd","updated":"2025-03-04 22:45:28.000000000","message":"recheck get logs to verify #3 - this looks like it helps","commit_id":"71c83f43934a9de219c450e993f81302abec682e"}],"neutron/tests/unit/notifiers/test_batch_notifier.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"abfd6a1ba2c330ee443a3d447a80430bffd81624","unresolved":true,"context_lines":[{"line_number":55,"context_line":"        events \u003d 20"},{"line_number":56,"context_line":"        for i in range(events):"},{"line_number":57,"context_line":"            self.notifier.queue_event(\u0027Event %s\u0027 % i)"},{"line_number":58,"context_line":"            time.sleep(0)  # yield to let coro execute"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        utils.wait_until_true(self.notifier._pending_events.empty,"},{"line_number":61,"context_line":"                              timeout\u003d5)"}],"source_content_type":"text/x-python","patch_set":2,"id":"77ef73ec_cacf0630","line":58,"range":{"start_line":58,"start_character":23,"end_line":58,"end_character":24},"updated":"2025-03-10 14:43:18.000000000","message":"Instead of increasing the BatchNotifier time, I would increase this sleep (and L72) to 0.1, in order to allow the other thread to receive and process the event.","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"de860343e2156e66d9f41da41535d72169f41b85","unresolved":true,"context_lines":[{"line_number":55,"context_line":"        events \u003d 20"},{"line_number":56,"context_line":"        for i in range(events):"},{"line_number":57,"context_line":"            self.notifier.queue_event(\u0027Event %s\u0027 % i)"},{"line_number":58,"context_line":"            time.sleep(0)  # yield to let coro execute"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        utils.wait_until_true(self.notifier._pending_events.empty,"},{"line_number":61,"context_line":"                              timeout\u003d5)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c74627c7_95c9cf5d","line":58,"range":{"start_line":58,"start_character":23,"end_line":58,"end_character":24},"in_reply_to":"77ef73ec_cacf0630","updated":"2025-03-11 14:52:15.000000000","message":"I actually did that in PS1 and it was not as expected, it caused the notifier to be called 20+ times.\n\nThis is the note I added to the bug after PS1:\n\nI think the correct fix is to make the batch interval in that test class longer (0.2 from 0.1), that way all the notifications are being queued in that single time interval.","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a73deaad50bf0e55b204c7a3ac2e5030b41528a9","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        events \u003d 20"},{"line_number":56,"context_line":"        for i in range(events):"},{"line_number":57,"context_line":"            self.notifier.queue_event(\u0027Event %s\u0027 % i)"},{"line_number":58,"context_line":"            time.sleep(0)  # yield to let coro execute"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        utils.wait_until_true(self.notifier._pending_events.empty,"},{"line_number":61,"context_line":"                              timeout\u003d5)"}],"source_content_type":"text/x-python","patch_set":2,"id":"eba786b0_a3996cd5","line":58,"range":{"start_line":58,"start_character":23,"end_line":58,"end_character":24},"in_reply_to":"94f9dba4_16340e21","updated":"2025-03-13 14:48:58.000000000","message":"Done","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"a7c0bbf644c8e456c6dabdc7511f2a7bc6e13d88","unresolved":true,"context_lines":[{"line_number":55,"context_line":"        events \u003d 20"},{"line_number":56,"context_line":"        for i in range(events):"},{"line_number":57,"context_line":"            self.notifier.queue_event(\u0027Event %s\u0027 % i)"},{"line_number":58,"context_line":"            time.sleep(0)  # yield to let coro execute"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        utils.wait_until_true(self.notifier._pending_events.empty,"},{"line_number":61,"context_line":"                              timeout\u003d5)"}],"source_content_type":"text/x-python","patch_set":2,"id":"94f9dba4_16340e21","line":58,"range":{"start_line":58,"start_character":23,"end_line":58,"end_character":24},"in_reply_to":"c74627c7_95c9cf5d","updated":"2025-03-12 21:02:41.000000000","message":"For example, this is the failure:\n\n return f(self, *args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n\n      File \"/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/unit/notifiers/test_batch_notifier.py\", line 66, in test_queue_event_multiple_events_notify_method\n    self.assertEqual(2, c_mock.call_count)\n\n      File \"/home/zuul/src/opendev.org/openstack/neutron/.tox/py312/lib/python3.12/site-packages/testtools/testcase.py\", line 419, in assertEqual\n    self.assertThat(observed, matcher, message)\n\n      File \"/home/zuul/src/opendev.org/openstack/neutron/.tox/py312/lib/python3.12/site-packages/testtools/testcase.py\", line 509, in assertThat\n    raise mismatch_error\n\n    testtools.matchers._impl.MismatchError: 2 !\u003d 20\n\n\nSo instead of having the notifier called twice it\u0027s called every time through the loop, which didn\u0027t seem to be the intention of the test.","commit_id":"71c83f43934a9de219c450e993f81302abec682e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b05049c8b1f9cebbb5387ce3322c528bcd19e1db","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        events \u003d 20"},{"line_number":56,"context_line":"        for i in range(events):"},{"line_number":57,"context_line":"            self.notifier.queue_event(\u0027Event %s\u0027 % i)"},{"line_number":58,"context_line":"            time.sleep(0)  # yield to let coro execute"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        utils.wait_until_true(self.notifier._pending_events.empty,"},{"line_number":61,"context_line":"                              timeout\u003d5)"}],"source_content_type":"text/x-python","patch_set":2,"id":"203a6e82_3191af61","line":58,"range":{"start_line":58,"start_character":23,"end_line":58,"end_character":24},"in_reply_to":"eba786b0_a3996cd5","updated":"2025-03-17 19:18:45.000000000","message":"So I\u0027m seeing this fail again:\n\nhttps://zuul.opendev.org/t/openstack/build/261468e2fe784a3b93007ed265fd1a9d\n\nAnd now I\u0027m more confused as the comment below mentions an interval of 2 seconds, which is what it was before changing to threading in https://review.opendev.org/c/openstack/neutron/+/939095","commit_id":"71c83f43934a9de219c450e993f81302abec682e"}]}
