Skip to content

Commit

Permalink
[wdspec] Remove OPTIONS and HEAD test cases from test_cached_revalidate
Browse files Browse the repository at this point in the history
Should fix the permafailure on Android beta

Differential Revision: https://phabricator.services.mozilla.com/D173007

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1823034
gecko-commit: b5218879860c44487d2f7c751b45bcdd6ecccd0b
gecko-reviewers: webdriver-reviewers, whimboo
  • Loading branch information
juliandescottes authored and moz-wptsync-bot committed Mar 20, 2023
1 parent 6a253fd commit 065cf84
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,9 @@ async def test_cached_redirect(
)


@pytest.mark.parametrize(
"method",
[
"GET",
"HEAD",
"OPTIONS",
],
)
@pytest.mark.asyncio
async def test_cached_revalidate(
bidi_session, top_context, wait_for_event, url, fetch, setup_network_test, method
bidi_session, top_context, wait_for_event, url, fetch, setup_network_test
):
network_events = await setup_network_test(
events=[
Expand All @@ -168,11 +160,11 @@ async def test_cached_revalidate(
f"/webdriver/tests/support/http_handlers/must-revalidate.py?nocache={random.random()}"
)
on_response_completed = wait_for_event("network.responseCompleted")
await fetch(revalidate_url, method=method)
await fetch(revalidate_url)
await on_response_completed

assert len(events) == 1
expected_request = {"method": method, "url": revalidate_url}
expected_request = {"method": "GET", "url": revalidate_url}
expected_response = {
"url": revalidate_url,
"fromCache": False,
Expand All @@ -188,7 +180,7 @@ async def test_cached_revalidate(

# Note that we pass a specific header so that the must-revalidate.py handler
# can decide to return a 304 without having to use another URL.
await fetch(revalidate_url, method=method, headers={"return-304": "true"})
await fetch(revalidate_url, headers={"return-304": "true"})
await on_response_completed

assert len(events) == 2
Expand Down

0 comments on commit 065cf84

Please sign in to comment.