Postal message order is wrong

Bug #1577723 reported by Jonas G. Drange on 2016-05-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-push (Ubuntu)
Undecided
Unassigned

Bug Description

Reproduce:
Sometimes

What happens:
----------------------------------------------------------------------
FAIL: <autogenerated>:66: ualPostalSuite.TestPostWorks

[LOG] 36.85478 DEBUG GetAll got: map[string]dbus.Variant{"SilentMode":dbus.Variant{Value:false}, "IncomingMessageSound":dbus.Variant{Value:""}, "IncomingMessageVibrateSilentMode":dbus.Variant{Value:false}, "IncomingMessageVibrate":dbus.Variant{Value:true}}
[LOG] 36.85478 DEBUG using helper helpId (exec: bar) for app com.example.test_test-number-one
[LOG] 36.85478 DEBUG current helper input backlog has grown to 1 entries.
[LOG] 36.85478 DEBUG using helper (exec: lhex) for app _classic-app
[LOG] 36.85478 INFO helper output: {"message":{"mars":42}}
[LOG] 36.85478 DEBUG copying backlog to avoid wasting too much space (1/2 used)
[LOG] 36.85478 DEBUG current helper input backlog has shrunk to 1 entries.
[LOG] 36.85478 DEBUG using helper helpId (exec: bar) for app com.example.test_test-number-one
[LOG] 36.85478 DEBUG current helper input backlog has shrunk to 0 entries.
[LOG] 36.85478 INFO helpId helper output: {"message":{"moon":1}}
[LOG] 36.85478 INFO helpId helper output: {"message":{"world":1}}
[LOG] 36.85478 DEBUG msgHandler did not present the notification
[LOG] 36.85478 DEBUG msgHandler did not present the notification
[LOG] 36.85478 DEBUG msgHandler did not present the notification
postal_test.go:422:
    c.Check(msgs[0], Equals, `{"world":1}`)
... obtained string = "{\"moon\":1}"
... expected string = "{\"world\":1}"

postal_test.go:423:
    c.Check(msgs[1], Equals, `{"moon":1}`)
... obtained string = "{\"world\":1}"
... expected string = "{\"moon\":1}"

postal_test.go:424:
    c.Check(box.nids, DeepEquals, []string{"m1", "m2"})
... obtained []string = []string{"m2", "m1"}
... expected []string = []string{"m1", "m2"}

** (process:7672): WARNING **: a message with id '0' already exists

** (process:7672): WARNING **: a message with id '0' already exists
OOPS: 103 passed, 1 FAILED
--- FAIL: TestService (0.09s)
FAIL
FAIL launchpad.net/ubuntu-push/client/service 0.151s

What should happen:
It needs to pass. Samuele proposed this patch [1].

[1] http://paste.ubuntu.com/16195965/

Related branches

summary: - Postal message order test is super flaky
+ Postal message order is wrong
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers