Skip to content

In CITGM, skip tests that are flaky there #3413

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

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 5 additions & 3 deletions test/connect-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ const { Client, Pool, errors } = require('..')
const net = require('node:net')
const assert = require('node:assert')

const skip = !!process.env.CITGM

// Using describe instead of test to avoid the timeout
describe('prioritize socket errors over timeouts', async () => {
describe('prioritize socket errors over timeouts', { skip }, async () => {
const t = tspl({ ...assert, after: () => {} }, { plan: 1 })
const client = new Pool('http://foorbar.invalid:1234', { connectTimeout: 1 })

Expand All @@ -29,7 +31,7 @@ net.connect = function (options) {
return new net.Socket(options)
}

test('connect-timeout', async t => {
test('connect-timeout', { skip }, async t => {
t = tspl(t, { plan: 1 })

const client = new Client('http://localhost:9000', {
Expand All @@ -52,7 +54,7 @@ test('connect-timeout', async t => {
await t.completed
})

test('connect-timeout', async t => {
test('connect-timeout', { skip }, async t => {
t = tspl(t, { plan: 1 })

const client = new Pool('http://localhost:9000', {
Expand Down
8 changes: 5 additions & 3 deletions test/node-test/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const { tspl } = require('@matteo.collina/tspl')
// eslint-disable-next-line no-control-regex
const removeEscapeColorsRE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g

test('debug#websocket', { skip: !process.versions.icu }, async t => {
const isCITGM = !!process.env.CITGM

test('debug#websocket', { skip: !process.versions.icu || isCITGM }, async t => {
const assert = tspl(t, { plan: 6 })
const child = spawn(
process.execPath,
Expand Down Expand Up @@ -44,7 +46,7 @@ test('debug#websocket', { skip: !process.versions.icu }, async t => {
await assert.completed
})

test('debug#fetch', async t => {
test('debug#fetch', { skip: isCITGM }, async t => {
const assert = tspl(t, { plan: 7 })
const child = spawn(
process.execPath,
Expand Down Expand Up @@ -78,7 +80,7 @@ test('debug#fetch', async t => {
await assert.completed
})

test('debug#undici', async t => {
test('debug#undici', { skip: isCITGM }, async t => {
// Due to Node.js webpage redirect
const assert = tspl(t, { plan: 7 })
const child = spawn(
Expand Down
Loading