'Fix' flaky redirect test (#19042)

This commit is contained in:
Matt Henkes
2021-11-23 08:16:20 -08:00
committed by GitHub
parent dc7503ebc9
commit 2b4916f032
2 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<head>
<meta http-equiv="refresh" content="0; url=/timeout?ms=100" />
<meta http-equiv="refresh" content="0; url=/redirect-timeout" />
<title>Page Redirect</title>
</head>
<body>

View File

@@ -43,6 +43,14 @@ const createApp = (port) => {
})
})
app.get('/redirect-timeout', (req, res) => {
return Promise
.delay(100)
.then(() => {
return res.send('<html><body>timeout</body></html>')
})
})
app.get('/custom-headers', (req, res) => {
return res.set('x-foo', 'bar')
.send('<html><body>hello there</body></html>')