Opened 7 years ago

Last modified 7 years ago

#16973 closed defect

MapCSSRendererTest fails on Ubuntu 18.04 — at Version 13

Reported by: Don-vip Owned by: team
Priority: major Milestone: 18.12
Component: Unit tests Version:
Keywords: linux ubuntu mapcss Cc: ris, naoliv, michael2402, wiktorn, simon04, floscher

Description (last modified by Don-vip)

As I feared with #16688, org.openstreetmap.josm.gui.mappaint.MapCSSRendererTest does not behave the same on Ubuntu 16.04 and Ubuntu 18.04.

https://josm.openstreetmap.de/jenkins/job/JOSM/lastCompletedBuild/testReport/

I don't know why, but this is problematic as we need it to run on both versions now we have updated to 18.04 but Travis CI is still using 16.04.

Test Reference Result Difference
area-text
eval
node-text
node-text2
way-text

Change History (28)

comment:1 by michael2402, 7 years ago

Do we know which JVM versions were used in both cases? I think I noticed differences between SUN and OpenJDK some time in the past.

comment:2 by ris, 7 years ago

I've always had problems with these tests locally FWIW.

comment:3 by michael2402, 7 years ago

@ris Wich JVM are you using and which OS?

The problem seems to be that they differ in rendering and the tests are doing a hard comparison of the images. We could add a threshold but judging visual similarity using a simple algorithm is difficult.

comment:5 by michael2402, 7 years ago

I will test it

Does anyone know the ant equivalent to the gradle --tests parameter (that only executes specific tests)?

comment:6 by ris, 7 years ago

OpenJDK 8, linux.

@michael2402 incidentally I added a tool to the testutils recently for making lenient checks on simple image content - ImagePatternMatching: https://github.com/openstreetmap/josm/blob/46e9e88b6de60be69bba0e8615d93c85222fef89/test/unit/org/openstreetmap/josm/testutils/ImagePatternMatching.java

Essentially allows you to make assertions about strips of the image using regular expressions.

in reply to:  5 comment:7 by Don-vip, 7 years ago

Replying to michael2402:

Does anyone know the ant equivalent to the gradle --tests parameter (that only executes specific tests)?

It's a bit complicated right now, see wiki/DevelopersGuide/Compiling

It used to be easy from Eclipse (right click on test, "run as Junit") but currently more difficult, see #17012

comment:8 by Don-vip, 7 years ago

Milestone: 18.1118.12

comment:9 by Don-vip, 7 years ago

Cc: wiktorn simon04 floscher added

@team does anyone have a lead to fix the issue? The build is failing since we updated the server to latest version of Ubuntu.

comment:10 by Don-vip, 7 years ago

Priority: normalmajor

comment:11 by stoecker, 7 years ago

When the test differs for Java version why not add different reference test data after verifying that the new data is only different, but not wrong?

comment:12 by michael2402, 7 years ago

We can just re-generate all data using the new configuration. Then visually check if it looks OK. Those are just problems with anti-aliasing and some rounding issues that are one pixel of.

The test is mostly there to be able to see if some map features just got "lost" during a refactoring (e.g. labels not being rendered, ...). For that, we don't need to be able to run it in every environment, although it would be nice.

by Don-vip, 7 years ago

Attachment: area-text-reference.png added

by Don-vip, 7 years ago

by Don-vip, 7 years ago

Attachment: area-text-test-output.png added

by Don-vip, 7 years ago

Attachment: eval-reference.png added

by Don-vip, 7 years ago

Attachment: eval-test-differences.png added

by Don-vip, 7 years ago

Attachment: eval-test-output.png added

by Don-vip, 7 years ago

Attachment: node-text-reference.png added

by Don-vip, 7 years ago

by Don-vip, 7 years ago

Attachment: node-text-test-output.png added

by Don-vip, 7 years ago

Attachment: node-text2-reference.png added

by Don-vip, 7 years ago

by Don-vip, 7 years ago

Attachment: node-text2-test-output.png added

by Don-vip, 7 years ago

Attachment: way-text-reference.png added

by Don-vip, 7 years ago

by Don-vip, 7 years ago

Attachment: way-text-test-output.png added

comment:13 by Don-vip, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.