Closed Bug 1868591 Opened 10 months ago Closed 10 months ago

PollPromise is logging the error message even if the polling succeeds before the timeout

Categories

(Remote Protocol :: Agent, task, P1)

task
Points:
1

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: jdescottes, Assigned: Sasha)

Details

(Whiteboard: [webdriver:m9])

Attachments

(1 file)

The PollPromise helper accepts an errorMessage option, but this will be logged both when the polling times out and when it succeeds.

We could set a flag before we call resolve(...) in the timeout case (searchfox) and then check it before logging the warning.

Assignee: nobody → aborovova
Status: NEW → ASSIGNED

Maybe we could make it async/await as well while touching it? It would help a lot.

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

Maybe we could make it async/await as well while touching it? It would help a lot.

I would move it to a separate bug, since I think it's not very straightforward.

Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f5094efab355 Fix PollPromise timeout warning. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Points: --- → 1
Priority: -- → P1
Whiteboard: [webdriver:m9]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: