File tree 3 files changed +7
-6
lines changed
test/production/app-dir/worker-restart
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export async function verifyTypeScriptSetup({
164
164
*/
165
165
166
166
// we are in a worker, print the error message and exit the process
167
- if ( process . env . JEST_WORKER_ID ) {
167
+ if ( process . env . IS_NEXT_WORKER ) {
168
168
if ( err instanceof Error ) {
169
169
console . error ( err . message )
170
170
} else {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export class Worker {
48
48
env : {
49
49
...( ( farmOptions . forkOptions ?. env || { } ) as any ) ,
50
50
...process . env ,
51
+ IS_NEXT_WORKER : 'true' ,
51
52
} as any ,
52
53
} ,
53
54
} ) as JestWorker
@@ -73,7 +74,7 @@ export class Worker {
73
74
worker . _child ?. on ( 'exit' , ( code , signal ) => {
74
75
if ( ( code || ( signal && signal !== 'SIGINT' ) ) && this . _worker ) {
75
76
logger . error (
76
- `Static worker exited with code: ${ code } and signal: ${ signal } `
77
+ `Next.js build worker exited with code: ${ code } and signal: ${ signal } `
77
78
)
78
79
79
80
// We're restarting the worker, so we don't want to exit the parent process
@@ -96,7 +97,7 @@ export class Worker {
96
97
if ( ! worker ) return
97
98
const resolve = resolveRestartPromise
98
99
logger . warn (
99
- `Sending SIGTERM signal to static worker due to timeout${
100
+ `Sending SIGTERM signal to Next.js build worker due to timeout${
100
101
timeout ? ` of ${ timeout / 1000 } seconds` : ''
101
102
} . Subsequent errors may be a result of the worker exiting.`
102
103
)
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ describe('worker-restart', () => {
13
13
14
14
const output = stdout + stderr
15
15
expect ( output ) . toContain (
16
- 'Sending SIGTERM signal to static worker due to timeout of 10 seconds. Subsequent errors may be a result of the worker exiting.'
16
+ 'Sending SIGTERM signal to Next.js build worker due to timeout of 10 seconds. Subsequent errors may be a result of the worker exiting.'
17
17
)
18
18
expect ( output ) . toContain (
19
- 'Static worker exited with code: null and signal: SIGTERM'
19
+ 'Next.js build worker exited with code: null and signal: SIGTERM'
20
20
)
21
21
expect ( output ) . toContain (
22
22
'Restarted static page generation for /bad-page because it took more than 10 seconds'
@@ -41,7 +41,7 @@ describe('worker-restart', () => {
41
41
42
42
const output = stdout + stderr
43
43
expect ( output ) . toContain (
44
- 'Static worker exited with code: null and signal: SIGKILL'
44
+ 'Next.js build worker exited with code: null and signal: SIGKILL'
45
45
)
46
46
} )
47
47
} )
You can’t perform that action at this time.
0 commit comments