Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,12 @@ def add_sub_queue(self, key: K, priority: int) -> Optional[SubQueue]:
added = True
break
elif pg.priority > priority:
# pg has a lower priority than the new group, so the new
# group belongs in front of it: priority_groups must stay
# sorted because the selection strategy walks it in order.
new_pg = self.PriorityGroup(priority)
new_pg.add_queue(sub_queue)
self.priority_groups.append(new_pg)
self.priority_groups.insert(i, new_pg)
added = True
break

Expand Down
7 changes: 0 additions & 7 deletions amber/src/test/python/core/models/test_internal_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ def test_it_accepts_all_recognized_element_types(
assert queue.is_empty()

@pytest.mark.timeout(2)
@pytest.mark.xfail(
reason=(
"LinkedBlockingMultiQueue.add_sub_queue does not currently insert new "
"priority groups ahead of lower-priority ones, so registering data before "
"control can break control-priority ordering."
)
)
def test_control_elements_dequeue_before_data_even_if_data_channel_registered_first(
self, queue, control_channel, data_channel
):
Expand Down
Loading