Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix failing tests #2097

Merged
merged 9 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: increase timeout for some redirect- tests
  • Loading branch information
KhafraDev committed Apr 26, 2023
commit c08a6c2f063b330508da06d65a79b5466bb5819a
3 changes: 3 additions & 0 deletions test/redirect-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const {
} = require('./utils/redirecting-servers')
const { createReadable, createReadableStream } = require('./utils/stream')

t.setTimeout(180000)

for (const factory of [
(server, opts) => new undici.Agent(opts),
(server, opts) => new undici.Pool(`http:https://${server}`, opts),
Expand All @@ -22,6 +24,7 @@ for (const factory of [
const request = (server, opts, ...args) => {
const dispatcher = factory(server, opts)
return undici.request(args[0], { ...args[1], dispatcher }, args[2])
.finally(() => dispatcher.close())
}

t.test('should always have a history with the final URL even if no redirections were followed', async t => {
Expand Down
2 changes: 2 additions & 0 deletions test/redirect-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const {
} = require('./utils/redirecting-servers')
const { createReadable, createWritable } = require('./utils/stream')

t.setTimeout(180000)

t.test('should always have a history with the final URL even if no redirections were followed', async t => {
t.plan(4)

Expand Down