[MGNLIMG-219] Some tests fail on MacOS + latest JDK/OpenJDK 8 Created: 18/May/20 Updated: 18/Oct/22 Resolved: 22/Mar/22 |
|
| Status: | Closed |
| Project: | Imaging |
| Component/s: | None |
| Affects Version/s: | 3.5.2 |
| Fix Version/s: | 3.5.3 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Federico Grilli | Assignee: | Jesus Alonso |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | maintenance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MacOS 10.14.6 |
||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | AuthorX Maintenance | ||||||||
| Sprint: | AuthorX 5 | ||||||||
| Story Points: | 2 | ||||||||
| Description |
|
Tests were temporarily ignored. See https://git.magnolia-cms.com/projects/MODULES/repos/imaging/commits/59cdd1e5179cdbea5743955a300e07e4807fb51d
|
| Comments |
| Comment by Maxime Michel [ 27/Sep/21 ] |
|
I could verify this on my local machine as well. |
| Comment by Maxime Michel [ 31/Jan/22 ] |
|
ilgun could you please take this over in your domain team's backlog? We don't have any particular expertise to figure this out, nor resources to be honest. Thanks. |
| Comment by Ilgun Ilgun [ 31/Jan/22 ] |
|
Thanks, mmichel. I'll ping ldelnevo for that. I think we haven't even included imaging in our domain filter yet. |
| Comment by Jesus Alonso [ 22/Mar/22 ] |
|
This is the outcome after investigating this issue:
[ERROR] info.magnolia.imaging.operations.cropresize.BoundedResizeTest.smallImageIsEnlargedWhileExpandTrue Time elapsed: 0.009 s <<< ERROR! java.lang.IllegalStateException: Can't find ImageWriter for jpeg
The error is happening because JPEGImageWriterSpi returns false in canEncodeImage. So the writer that handles the jpeg cannot process this particular image.
final ImageTypeSpecifier imgType = ImageTypeSpecifier.createFromRenderedImage(img);
Changing the code to: final ImageTypeSpecifier imgType = ImageTypeSpecifier.createFromRenderedImage(img); final Iterator<ImageWriter> iter = ImageIO.getImageWritersByFormatName("jpeg"); the error we now have is: javax.imageio.IIOException: Bogus input colorspace at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:1007) at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:371) at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:162) which seems to be related with transparency. And as we saw in the 2 images, png has transparency = 3 while jpg has transparency = 1. All in all, it seems some versions of Java for MacOS does not handle transparency well. |
| Comment by Jesus Alonso [ 22/Mar/22 ] |
|
Finally we have used the assumption API to exclude those failing tests when the build is in macOS |