Modify

Opened 8 days ago

Last modified 2 days ago

#15630 new enhancement

[PATCH] MinimapDialogTest: add tests covering "show downloaded area" functionality

Reported by: ris Owned by: team
Priority: minor Milestone: 17.12
Component: Unit tests Version:
Keywords: minimapdialog tests Cc:

Description

Quite a simple extension of MinimapDialogTest using largely the existing mechanisms to test the "show downloaded area" feature.

Patch against r13187, also visible here:

https://github.com/risicle/josm/compare/79b06231b3e9342e2c95c1081ff4f82eb466b1d7...ris-minimapdialogtest-downloadedarea

And that mostly concludes the testing work I wanted to do to cover my previous feature addition... can probably get back to feature work now...

Attachments (1)

v1-0001-MinimapDialogTest-add-tests-covering-show-downloa.patch (18.1 KB) - added by ris 8 days ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 days ago by Don-vip

Milestone: 17.12

comment:2 Changed 8 days ago by Don-vip

I have two failures:

java.lang.AssertionError: Row 88 failed to match pattern ^g+bv+bg+$
	at org.junit.Assert.fail(Assert.java:88)
	at org.openstreetmap.josm.testutils.ImagePatternMatching.imageStripPatternMatchInner(ImagePatternMatching.java:51)
	at org.openstreetmap.josm.testutils.ImagePatternMatching.rowMatch(ImagePatternMatching.java:211)
	at org.openstreetmap.josm.gui.dialogs.MinimapDialogTest.testShowDownloadedAreaLayerSwitching(MinimapDialogTest.java:634)
java.lang.AssertionError: Row 88 failed to match pattern ^d+bq+v+bg+d+$
	at org.junit.Assert.fail(Assert.java:88)
	at org.openstreetmap.josm.testutils.ImagePatternMatching.imageStripPatternMatchInner(ImagePatternMatching.java:51)
	at org.openstreetmap.josm.testutils.ImagePatternMatching.rowMatch(ImagePatternMatching.java:211)
	at org.openstreetmap.josm.gui.dialogs.MinimapDialogTest.testShowDownloadedArea(MinimapDialogTest.java:484)

comment:3 Changed 8 days ago by ris

When those assertions fail they should also print to the stderr the failed row/col in character form - would you be able to paste that too please?

comment:4 Changed 8 days ago by Don-vip

Sure:

testShowDownloadedAreaLayerSwitching:
Full strip failing to match pattern ^g+bv+bg+$: ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddbqqqqqqqqqqqqqqqqqqqqqqqqqqbdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

testShowDownloadedArea:
Full strip failing to match pattern ^d+bq+v+bg+d+$: dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddgggggggggbvvvvvvvvvvvvvvvvvqqqqqqqqqqbddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

comment:5 Changed 7 days ago by ris

Thinking about this, it's a very odd error to get, because there's very little special that the test's doing, and the downloaded area marks seem to be "out" a bit relative to the viewport marker... I've got to wonder if we've stumbled on a genuine bug. Could you check with this build whether, in real use, the "downloaded area" marks appear accurate?

comment:6 Changed 5 days ago by ris

/me considers grabbing MS's gratis Win10 VM image to see if he can use it as a ghetto java development environment to debug this.

comment:7 Changed 2 days ago by ris

Ok, that's really weird. I can't reproduce the failure on a Win10 vm running jdk 1.8.0_152-b16.

All 7 tests pass fine.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to ris
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.