test: unflake happy-eyeballs tests (#31861)

This commit is contained in:
Max Schmitt 2024-07-25 20:22:51 +02:00 committed by GitHub
parent d8d5289e86
commit a966abfd31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -35,8 +35,12 @@ const __testHookLookup = (hostname: string): LookupAddress[] => {
let interceptedHostnameLookup: string | undefined;
it.beforeEach(() => {
it.beforeEach(({ server }) => {
interceptedHostnameLookup = undefined;
// Force a new connection every time, so that we can intercept the hostname lookup.
server.setExtraHeaders('/simple.json', {
'Connection': 'close',
});
});
it('get should work', async ({ context, server }) => {