ampproject / ampproject/amphtml

I2I: Cache network requests dispatched from tests

Open
#34,044 7 comments 0 reactions 1 assignee Claimed by @rileyajones View on GitHub
INTENT TO IMPLEMENT Stale
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

## Summary

Network requests dispatched from tests both slow down test suites and cause instability. By routing these requests through a proxy server which caches the responses we can speed up test runs and reduce flakes.

## Motivation
AMP developers spend a lot of time waiting for tests to run and are forced to repeat this process when flakes occur.
[amphtml Pipelines](https://app.circleci.com/pipelines/github/ampproject/amphtml)
[amphtml Jobs insights](https://app.circleci.com/insights/github/ampproject/amphtml/workflows/CircleCI/jobs?reporting-window=last-90-days&branch=main)

Other options:
* Prevent new tests which use network requests from being added and then gradually removing the requests that exist.
* Update the hosts file to broadly redirect requests and stub them.

/cc @ampproject/wg-approvers

[Design Doc](https://docs.google.com/document/d/1B9fr3Xcs6hDuyhhLmZ-uiHuqN2lZk5n0X5Lp8KRZNAU)

#26754

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.