Skip to content

Commit e1496cf

Browse files
authored
test: ignore test for CITGM (nodejs#3993)
1 parent 54c5c68 commit e1496cf

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

test/issue-3356.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
const { tspl } = require('@matteo.collina/tspl')
44
const { test, after } = require('node:test')
5+
const { setTimeout: sleep } = require('node:timers/promises')
56
const { createServer } = require('node:http')
67
const { once } = require('node:events')
78
const { tick: fastTimersTick } = require('../lib/util/timers')
89
const { fetch, Agent, RetryAgent } = require('..')
910

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

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

4647
fastTimersTick()
4748

48-
setTimeout(async () => {
49-
try {
50-
t.equal(response.status, 200)
51-
// consume response
52-
await response.text()
53-
} catch (err) {
54-
t.equal(err.name, 'TypeError')
55-
t.equal(err.cause.code, 'UND_ERR_REQ_RETRY')
56-
}
57-
}, 200)
49+
await sleep(500)
50+
51+
try {
52+
t.equal(response.status, 200)
53+
// consume response
54+
await response.text()
55+
} catch (err) {
56+
t.equal(err.name, 'TypeError')
57+
t.equal(err.cause.code, 'UND_ERR_REQ_RETRY')
58+
}
5859

5960
await t.completed
6061
})

0 commit comments

Comments
 (0)