Closed Bug 1667278 Opened 2 months ago Closed 27 days ago

Intermittent org.mozilla.geckoview.test.MediaSessionTest.domMultiSessions | java.lang.AssertionError: onMetadata should be called specified number of times

Categories

(GeckoView :: General, defect, P1)

Unspecified
All
defect

Tracking

(firefox82 unaffected, firefox83 wontfix, firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox82 --- unaffected
firefox83 --- wontfix
firefox84 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: esawin)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, intermittent-failure, Whiteboard: [geckoview:m84])

Attachments

(1 file)

Filed by: rmaries [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=316656064&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ADkx1eAUQYWTO7RLkccqLg/runs/0/artifacts/public/logs/live_backing.log


[task 2020-09-24T23:39:10.772Z] 23:39:10     INFO -  TEST-START | org.mozilla.geckoview.test.MultiMapTest.addMultipleValues
[task 2020-09-24T23:39:10.764Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS_CODE: -2
[task 2020-09-24T23:39:10.764Z] 23:39:10  WARNING -  TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.MediaSessionTest.domMultiSessions | java.lang.AssertionError: onMetadata should be called specified number of times
[task 2020-09-24T23:39:10.764Z] 23:39:10     INFO -  TEST-INFO took 4114ms
[task 2020-09-24T23:39:10.764Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: numtests=748
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: stream=
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | org.mozilla.geckoview.test.MultiMapTest:
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: test=addAll
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: class=org.mozilla.geckoview.test.MultiMapTest
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: current=317
[task 2020-09-24T23:39:10.765Z] 23:39:10     INFO -  org.mozilla.geckoview.test | INSTRUMENTATION_STATUS_CODE: 1```
Assignee: nobody → esawin
Priority: P5 → P1
Whiteboard: [geckoview:m84]

The test fails because there are 2 instead of 1 calls to onMetadata on the second session for the given test steps.

Calling onMetadata more than once is not critical here since we don't give any guarantees in the API on the number of calls and the provided metadata remains correct.
For this reason, I'm going to remove that constraint in the test for now to reduce intermittent failure noise.

@alwu, do you have an idea, why that might be happening in this case?

Flags: needinfo?(alwu)
Blocks: 1674110
Pushed by esawin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/885dee9732f6
[1.0] Remove the strict count contraint for the number of onMetadata calls to reduce non-critical test failure noise. r=geckoview-reviewers,agi

I suppose the code is running from here [1]? If that is the loaded page for sessions, then we do dispatch two times of metadatachange event.

The first one is resulted in calling active.play() where we haven't set the media session metadata, so we would use the default metadata in the beginning. Then, when calling updateMetadata(), it would update the metadata via MediaSession API, which would update the current metadata to the customize metadata, and dispatch the second metadatachange event.

[1] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/androidTest/assets/www/media_session_dom1.html#92-95

Flags: needinfo?(alwu)
Status: NEW → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
See Also: → 1674528
You need to log in before you can comment on or make changes to this bug.