Unverified Commit c6767204 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Ignore in deploy tests if a child process isn't available (#85636)

Because deploy tests won't have access to the child process.
parent 5c045fb2
...@@ -16,6 +16,22 @@ export class NextDeployInstance extends NextInstance { ...@@ -16,6 +16,22 @@ export class NextDeployInstance extends NextInstance {
private _buildId: string private _buildId: string
private _writtenHostsLine: string | null = null private _writtenHostsLine: string | null = null
protected throwIfUnavailable(): void | never {
if (this.isStopping !== null) {
throw new Error('Next.js is no longer available.', {
cause: this.isStopping,
})
}
if (this.isDestroyed !== null) {
throw new Error('Next.js is no longer available.', {
cause: this.isDestroyed,
})
}
if (this.childProcess === undefined) {
// deploy tests don't have access to the process
}
}
public get buildId() { public get buildId() {
// get deployment ID via fetch since we can't access // get deployment ID via fetch since we can't access
// build artifacts directly // build artifacts directly
......
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