Unverified Commit 84dd9be7 authored by Jamiboy Mohammad's avatar Jamiboy Mohammad Committed by GitHub

test: retain deploy exclusions for local process control (#99392)

## Summary

Retain the deployment exclusions for two suites that require control of
the local Node.js process, replacing legacy `skipDeployment` handling
with explicit `@force-gate !deploy` directives:

- `graceful-shutdown-next-after/next-start` starts a fresh Next.js
process, sends `SIGINT` and `SIGTERM`, and checks whether `after()`
callbacks finish before it exits. Vercel manages the deployed process
lifecycle; the deploy test runner cannot send those signals to that
process or deterministically observe its shutdown. This does not imply
that Vercel lacks graceful shutdown support.
- `node-cli-args` invokes Node with `--experimental-network-inspection`
and checks whether that invocation starts successfully on the current
Node version. Deploy mode does not execute the test's local
`startCommand`, so it cannot exercise Node's handling of that CLI flag.

Preserve all test bodies, including the different development/production
shutdown expectations and the Node 20 rejection case.

Based on #98994, with #98911 above this PR.

## Verification

- The shutdown assertions passed in webpack development and production
modes (both signals in each mode).
- The Node CLI test passed in both modes with normal isolated
installation on Node 26.10.0. An initial `NEXT_SKIP_ISOLATE=1` run could
not resolve its required fixture-local `node_modules/next`; using the
normal fixture installation resolved that validation setup issue.
- Collection with the real gate runtime and fixture setup stubbed
confirmed all three assertions enabled in dev/start and all three
skipped in deploy. A syntax-tree comparison confirmed the test
definitions and assertions are unchanged.
- Formatting and ESLint passed. All 24 gate-transform tests passed on
the same base.
- The JavaScript workspace build passed. Full bootstrap remains blocked
in the native Rust step (`cargo metadata failed to run`). Deploy
execution was not run; local collection verifies the exclusions without
deployment.

<!-- NEXT_JS_LLM -->
parent 788e6a7a
import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils'
// These tests send SIGINT/SIGTERM to a local Next.js process and observe whether
// after() finishes before it exits. Vercel manages the deployed process lifecycle,
// so the test runner cannot trigger and observe this shutdown sequence.
// @force-gate !deploy
describe('after during server shutdown - next start', () => {
const { next, skipped, isNextDev } = nextTestSetup({
const { next, isNextDev } = nextTestSetup({
files: __dirname,
skipDeployment: true, // the tests use cli logs
skipStart: true,
})
if (skipped) {
return
}
beforeEach(async () => {
await next.start()
......
import { nextTestSetup } from 'e2e-utils'
// This tests Node's handling of a CLI flag in the local startCommand. Deploy mode
// uses Vercel's managed runtime and does not execute that Node invocation.
// @force-gate !deploy
describe('node-cli-args', () => {
const { next } = nextTestSetup({
files: __dirname,
startCommand: `node --experimental-network-inspection ./node_modules/next/dist/bin/next ${process.env.NEXT_TEST_MODE === 'dev' ? 'dev' : 'start'}`,
skipDeployment: true,
skipStart: true,
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment