Skip to content

Commit 051f056

Browse files
authored
test: capture cache test worker stderr and preserve failures (#5206)
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
1 parent 697e845 commit 051f056

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/cache-interceptor/cache-tests.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ for (let i = 0; i < testEnvironments.length; i++) {
154154
stdout.push(chunk)
155155
})
156156

157-
cacheTestsWorkerProcess.stderr.on('error', chunk => {
157+
cacheTestsWorkerProcess.stderr.on('data', chunk => {
158158
stdout.push(chunk)
159159
})
160160

@@ -171,7 +171,9 @@ let exitCode = 0
171171

172172
// Print the results of all the results in the order that they exist
173173
for (const [code, stdout] of await Promise.all(results)) {
174-
exitCode = code
174+
if (code !== 0) {
175+
exitCode = code
176+
}
175177

176178
for (const line of stdout) {
177179
process.stdout.write(line)

0 commit comments

Comments
 (0)