Closed
Bug 1916238
Opened 1 year ago
Closed 1 year ago
High frequency Wd3 /webdriver/tests/bidi/network/continue_response/cookies.py | test_cookie_attributes_before_request_sent[expiry] - AssertionError
Categories
(Testing :: web-platform-tests, defect, P5)
Testing
web-platform-tests
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1916221
People
(Reporter: intermittent-bug-filer, Unassigned)
References
(Regression)
Details
(Keywords: intermittent-failure, regression)
Filed by: abutkovits [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=472581072&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/PM_yxR6vS8CaVyNEWn_MLg/runs/0/artifacts/public/logs/live_backing.log
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - TEST-PASS | /webdriver/tests/bidi/network/continue_response/cookies.py | test_cookie_attributes_before_request_sent[secure]
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/bidi/network/continue_response/cookies.py | test_cookie_attributes_before_request_sent[expiry] - AssertionError
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - setup_blocked_request = <function setup_blocked_request.<locals>.setup_blocked_request at 0x7f7adda06c10>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - subscribe_events = <function subscribe_events.<locals>.subscribe_events at 0x7f7add908670>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f7add9743d0>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - top_context = {'children': [], 'context': '1a394c59-c4ea-44a6-b973-c61ae17c807b', 'originalOpener': None, 'parent': None, ...}
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - wait_for_event = <function wait_for_event.<locals>.wait_for_event at 0x7f7add9d6550>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - wait_for_future_safe = <function wait_for_future_safe.<locals>.wait_for_future_safe at 0x7f7add908790>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - url = <function url.<locals>.url at 0x7f7add908c10>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - domain_value = <function domain_value.<locals>.domain_value at 0x7f7adda061f0>
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - cookie = {'domain': 'web-platform.test', 'expiry': 1725369303, 'httpOnly': False, 'name': 'foo', ...}
[task 2024-09-02T13:15:10.111Z] 13:15:10 INFO - with_domain = None
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - expected_cookie = {'domain': 'web-platform.test', 'expiry': 1725369302, 'httpOnly': False, 'name': 'foo', ...}
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - @pytest.mark.parametrize(
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - "cookie, with_domain, expected_cookie",
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - SET_COOKIE_TEST_PARAMETERS,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - ids=SET_COOKIE_TEST_IDS,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - )
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - async def test_cookie_attributes_before_request_sent(
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - setup_blocked_request,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - subscribe_events,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - bidi_session,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - top_context,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - wait_for_event,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - wait_for_future_safe,
[task 2024-09-02T13:15:10.112Z] 13:15:10 INFO - url,
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - domain_value,
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - cookie,
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - with_domain,
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - expected_cookie,
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - ):
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - if with_domain == "default domain":
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - domain = ""
[task 2024-09-02T13:15:10.113Z] 13:15:10 INFO - cookie["domain"] = domain_value()
[task 2024-09-02T13:15:10.114Z] 13:15:10 INFO - expected_cookie["domain"] = f".{domain_value()}"
[task 2024-09-02T13:15:10.114Z] 13:15:10 INFO - elif with_domain == "alt domain":
[task 2024-09-02T13:15:10.114Z] 13:15:10 INFO - domain = "alt"
[task 2024-09-02T13:15:10.114Z] 13:15:10 INFO - cookie["domain"] = domain_value("alt")
[task 2024-09-02T13:15:10.115Z] 13:15:10 INFO - expected_cookie["domain"] = f".{domain_value('alt')}"
[task 2024-09-02T13:15:10.115Z] 13:15:10 INFO - else:
[task 2024-09-02T13:15:10.116Z] 13:15:10 INFO - # If the cookie is not set for a specific domain it will default to
[task 2024-09-02T13:15:10.116Z] 13:15:10 INFO - # the current domain, but no "." will be prepended to the actual cookie
[task 2024-09-02T13:15:10.116Z] 13:15:10 INFO - # domain
[task 2024-09-02T13:15:10.116Z] 13:15:10 INFO - domain = ""
[task 2024-09-02T13:15:10.117Z] 13:15:10 INFO - expected_cookie["domain"] = domain_value()
[task 2024-09-02T13:15:10.117Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.117Z] 13:15:10 INFO - request = await setup_blocked_request(
[task 2024-09-02T13:15:10.117Z] 13:15:10 INFO - phase="responseStarted",
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO - navigate=True,
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO - blocked_url=url(PAGE_PROVIDE_RESPONSE_HTML, domain=domain),
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO - )
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO - await subscribe_events(events=[LOAD_EVENT])
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.118Z] 13:15:10 INFO - on_load = wait_for_event(LOAD_EVENT)
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - # Provide response with an empty cookies list
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - await bidi_session.network.continue_response(
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - request=request,
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - cookies=[cookie],
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - )
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - # Wait for the navigation to complete.
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - await wait_for_future_safe(on_load)
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.119Z] 13:15:10 INFO - cookies = await bidi_session.storage.get_cookies()
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - assert len(cookies["cookies"]) == 1
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - cookie = cookies["cookies"][0]
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - > recursive_compare(expected_cookie, cookie)
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7f7add9743d0>
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - cookie = {'domain': 'web-platform.test',
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - 'expiry': 1725369303,
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - 'httpOnly': False,
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - 'name': 'foo',
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - 'path': '/',
[task 2024-09-02T13:15:10.120Z] 13:15:10 INFO - 'sameSite': 'none',
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'secure': False,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'size': 6,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'value': {'type': 'string', 'value': 'bar'}}
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - cookies = {'cookies': [{'domain': 'web-platform.test',
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'expiry': 1725369303,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'httpOnly': False,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'name': 'foo',
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'path': '/',
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'sameSite': 'none',
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'secure': False,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'size': 6,
[task 2024-09-02T13:15:10.121Z] 13:15:10 INFO - 'value': {'type': 'string', 'value': 'bar'}}],
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'partitionKey': {}}
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - domain = ''
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - domain_value = <function domain_value.<locals>.domain_value at 0x7f7adda061f0>
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - expected_cookie = {'domain': 'web-platform.test',
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'expiry': 1725369302,
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'httpOnly': False,
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'name': 'foo',
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'path': '/',
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'sameSite': 'none',
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'secure': False,
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'size': 6,
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - 'value': {'type': 'string', 'value': 'bar'}}
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - on_load = <Future finished result={'context': '1a394c59-c4e...-c61ae17c807b', 'navigation': '923d9f57-a54...-031b46f9f642', 'timestamp': 1725282908068, 'url': 'https://web-...response.html'}>
[task 2024-09-02T13:15:10.130Z] 13:15:10 INFO - request = '34'
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - setup_blocked_request = <function setup_blocked_request.<locals>.setup_blocked_request at 0x7f7adda06c10>
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - subscribe_events = <function subscribe_events.<locals>.subscribe_events at 0x7f7add908670>
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - top_context = {'children': [],
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - 'context': '1a394c59-c4ea-44a6-b973-c61ae17c807b',
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - 'originalOpener': None,
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - 'parent': None,
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - 'url': 'https://web-platform.test:8443/webdriver/tests/bidi/network/support/provide_response.html',
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - 'userContext': 'default'}
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - url = <function url.<locals>.url at 0x7f7add908c10>
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - wait_for_event = <function wait_for_event.<locals>.wait_for_event at 0x7f7add9d6550>
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - wait_for_future_safe = <function wait_for_future_safe.<locals>.wait_for_future_safe at 0x7f7add908790>
[task 2024-09-02T13:15:10.131Z] 13:15:10 INFO - with_domain = None
[task 2024-09-02T13:15:10.132Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.132Z] 13:15:10 INFO - tests/web-platform/tests/webdriver/tests/bidi/network/continue_response/cookies.py:152:
[task 2024-09-02T13:15:10.132Z] 13:15:10 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-09-02T13:15:10.132Z] 13:15:10 INFO - tests/web-platform/tests/webdriver/tests/bidi/__init__.py:25: in recursive_compare
[task 2024-09-02T13:15:10.132Z] 13:15:10 INFO - recursive_compare(expected[key], actual[key])
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - actual = {'domain': 'web-platform.test',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'expiry': 1725369303,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'httpOnly': False,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'name': 'foo',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'path': '/',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'sameSite': 'none',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'secure': False,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'size': 6,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'value': {'type': 'string', 'value': 'bar'}}
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - expected = {'domain': 'web-platform.test',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'expiry': 1725369302,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'httpOnly': False,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'name': 'foo',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'path': '/',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'sameSite': 'none',
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'secure': False,
[task 2024-09-02T13:15:10.133Z] 13:15:10 INFO - 'size': 6,
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - 'value': {'type': 'string', 'value': 'bar'}}
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - key = 'expiry'
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - expected = 1725369302, actual = 1725369303
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - def recursive_compare(expected: Any, actual: Any) -> None:
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - if callable(expected):
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - expected(actual)
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - return
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - if isinstance(actual, List) and isinstance(expected, List):
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - assert len(expected) == len(actual)
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - for index, _ in enumerate(expected):
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - recursive_compare(expected[index], actual[index])
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO - return
[task 2024-09-02T13:15:10.134Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - if isinstance(actual, Dict) and isinstance(expected, Dict):
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - # Actual Mapping can have more keys as part of the forwards-compat design.
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - assert (
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - expected.keys() <= actual.keys()
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - ), f"Key set should be present: {set(expected.keys()) - set(actual.keys())}"
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - for key in expected.keys():
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - recursive_compare(expected[key], actual[key])
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - return
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - > assert expected == actual
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - E AssertionError
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - actual = 1725369303
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - expected = 1725369302
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO -
[task 2024-09-02T13:15:10.135Z] 13:15:10 INFO - tests/web-platform/tests/webdriver/tests/bidi/__init__.py:28: AssertionError
[task 2024-09-02T13:15:10.136Z] 13:15:10 INFO - .....
[task 2024-09-02T13:15:10.136Z] 13:15:10 INFO - TEST-OK | /webdriver/tests/bidi/network/continue_response/cookies.py | took 7820ms
Comment 1•1 year ago
|
||
:baku, since you are the author of the regressor, bug 1913161, could you take a look?
For more information, please visit BugBot documentation.
Flags: needinfo?(amarchesini)
Comment 2•1 year ago
|
||
This has been fixed by 1916221
Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1916221
Flags: needinfo?(amarchesini)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•