Skip to content

Commit

Permalink
test: ignore test for CITGM (#3993)
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 authored Jan 8, 2025
1 parent 54c5c68 commit e1496cf
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions test/issue-3356.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

const { tspl } = require('@matteo.collina/tspl')
const { test, after } = require('node:test')
const { setTimeout: sleep } = require('node:timers/promises')
const { createServer } = require('node:http')
const { once } = require('node:events')
const { tick: fastTimersTick } = require('../lib/util/timers')
const { fetch, Agent, RetryAgent } = require('..')

test('https://github.com/nodejs/undici/issues/3356', async (t) => {
test('https://github.com/nodejs/undici/issues/3356', { skip: process.env.CITGM }, async (t) => {
t = tspl(t, { plan: 3 })

let shouldRetry = true
Expand Down Expand Up @@ -45,16 +46,16 @@ test('https://github.com/nodejs/undici/issues/3356', async (t) => {

fastTimersTick()

setTimeout(async () => {
try {
t.equal(response.status, 200)
// consume response
await response.text()
} catch (err) {
t.equal(err.name, 'TypeError')
t.equal(err.cause.code, 'UND_ERR_REQ_RETRY')
}
}, 200)
await sleep(500)

try {
t.equal(response.status, 200)
// consume response
await response.text()
} catch (err) {
t.equal(err.name, 'TypeError')
t.equal(err.cause.code, 'UND_ERR_REQ_RETRY')
}

await t.completed
})

0 comments on commit e1496cf

Please sign in to comment.