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

chore: updates for undici fetch #1496

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
17 changes: 11 additions & 6 deletions journey/pepr-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@

import { afterAll, expect, it } from "@jest/globals";
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import { Agent } from "https";
import { fetch } from "kubernetes-fluent-client";
import { RequestInit } from "node-fetch";
import { RequestInit, Agent } from "undici";
import { cwd } from "./entrypoint.test";
import { sleep } from "./k8s";

const fetchBaseUrl = "https://localhost:3000";
const fetchOpts: RequestInit = {
agent: new Agent({
// Avoid tls issues for self-signed certs
rejectUnauthorized: false,
method: "GET",
headers: {
"Content-Type": "application/json; charset=UTF-8",
},
dispatcher: new Agent({
// disable keep-alive https://github.com/nodejs/undici/issues/2522#issuecomment-1859213319
pipelining: 0,
connect: {
rejectUnauthorized: false,
},
}),
};

Expand Down Expand Up @@ -78,7 +84,6 @@ export function peprDev() {
} else {
// Abort all further processing
success = true;

// Finish the test
done();
}
Expand Down
Loading
Loading