category overrides are not always applied in the right order

Bug #1670344 reported by Sylvain Pineau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Fix Released
High
Sylvain Pineau

Bug Description

Documentation states:

Overrides are applied in order and the last applied override is the effective override in a given test plan.

But I've found that the Bluez after-suspend jobs are not always getting the right category override.
I'm using the following field in one of our snappy test plan:

category_overrides:
    apply "2013.com.canonical.plainbox::suspend" to "2013.com.canonical.certification::after-suspend-.*"
    apply "2013.com.canonical.plainbox::suspend" to "after-suspend-.*"
    apply "2013.com.canonical.certification::after-suspend-bluetooth_bluez5_selftests" to "2013.com.canonical.certification::after-suspend-bluetooth/bluez-internal.*"

When running checkbox-cli, sometimes I see the 250 bluez tests after suspend properly grouped into their own category sometimes part of the Suspend one (the plainbox one).

Looking at plainbox code [1] in details, we are creating an override map based on collections.defaultdict(list) and looping over items(). This is not a deterministic order.
A solution used OrderedDict is needed.

[1] https://git.launchpad.net/plainbox/tree/plainbox/impl/session/state.py#n586

Related branches

description: updated
Changed in plainbox:
status: New → In Progress
milestone: none → 0.34.0
summary: - cetegory overrides are not always applied in the right order
+ category overrides are not always applied in the right order
Changed in plainbox:
status: In Progress → Fix Committed
Pierre Equoy (pieq)
Changed in plainbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.