Closed Bug 1790699 Opened 2 years ago Closed 2 years ago

BiDi wdspec tests should await on asyncio.sleep

Categories

(Remote Protocol :: Agent, task, P1)

task
Points:
1

Tracking

(firefox107 fixed)

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

(Whiteboard: [webdriver:m5] [wptsync upstream])

Attachments

(1 file)

We are missing await on many asyncio.sleep calls in BiDi wdspec tests:

https://searchfox.org/mozilla-central/search?q=asyncio.sleep&path=bidi&case=false&regexp=false

Does that have any huge consequences eg. testing invalid states? I assume we should get this fixed quickly? Seems to be a quick thing to do.

Flags: needinfo?(jdescottes)

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #1)

Does that have any huge consequences eg. testing invalid states? I assume we should get this fixed quickly? Seems to be a quick thing to do.

It's making some "safety" asserts useless an redundant. It's always in situations where we want to check that we don't get extra events, after unsubscribing for instance.

We could have missed regressions because of that, but it's unlikely. Those asserts are usually safety asserts, used in a sequence such as:

  • perform an action that could trigger an event
  • check that we didn't receive the event
  • wait for 0.5 seconds
  • check again that we didn't receive the event

We are never sure that the first check would catch regressions, that's why we have the second one, in case the event gets emitted asynchronously.

But other than this yes it's a very simple fix, 1 point material. Only downside is that it will make those tests a bit slower.

Flags: needinfo?(jdescottes)

let's address this, it's a tiny issue.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m5]
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2d5f5979479b
[wdspec] bidi tests should always await on asyncio.sleep r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35969 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m5] → [webdriver:m5], [wptsync upstream]
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4bb8be194099
[wdspec] bidi tests should always await on asyncio.sleep CLOSED TREE
Upstream PR was closed without merging

No worries, thanks for re-landing Andreea!

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Whiteboard: [webdriver:m5], [wptsync upstream] → [webdriver:m5] [wptsync upstream]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: