Error during compare step does't fail test
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
I got the following error during compare step:
```
compare | OK: pass1.png
events.js:174
throw er; // Unhandled 'error' event
^
Error: Stream not writable
at module.exports.ChunkStream.write (/usr/local/lib/node_modules/backstopjs/node_modules/node-resemble-js/node_modules/pngjs/lib/chunkstream.js:46:24)
at exports.PNG.PNG.write (/usr/local/lib/node_modules/backstopjs/node_modules/node-resemble-js/node_modules/pngjs/lib/png.js:92:16)
at ReadStream.ondata (_stream_readable.js:689:20)
at ReadStream.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at ReadStream.Readable.push (_stream_readable.js:220:10)
at lazyFs.read (internal/fs/streams.js:181:12)
at FSReqWrap.wrapper [as oncomplete] (fs.js:462:17)
Emitted 'error' event at:
at exports.PNG.onerror (_stream_readable.js:713:12)
at exports.PNG.emit (events.js:189:13)
at module.exports.emit (events.js:189:13)
at module.exports.ChunkStream.write (/usr/local/lib/node_modules/backstopjs/node_modules/node-resemble-js/node_modules/pngjs/lib/chunkstream.js:46:10)
at exports.PNG.PNG.write (/usr/local/lib/node_modules/backstopjs/node_modules/node-resemble-js/node_modules/pngjs/lib/png.js:92:16)
[... lines matching original stack trace ...]
at ReadStream.Readable.push (_stream_readable.js:220:10)
compare | OK: test1.png
... skipped for brevity 1000 normal compare lines
compare | ERROR { requireSameDimensions: false, size: isDifferent, content: 6.35%, threshold: 0.1% }: failing.png
See: /src/__backstop__/bitmaps/test/20190530-111357/failed_diff_failing.png
compare | OK: test2.png
Done in 1352.16s.
```
Notice there is no report step at the end.
The reason for png fail is probably some glitch on the environment, but the main issue is that such crashes mask the build as passing.
---
This was run on travis using backstopjs/backstopjs docker image.
Run command is `docker run --rm -v $PWD:/src backstopjs/backstopjs test`
The png error might be related to #350.
Contributor guide
Assessment
This issue has not been assessed yet.