#14255 closed defect (fixed)
JCSCachedTileLoaderJobTest is failing
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 17.01 |
Component: | Core | Version: | |
Keywords: | Cc: | wiktorn |
Description
The unit test JCSCachedTileLoaderJobTest is failing in Jenkins. (Does work on my local machine.)
Attachments (0)
Change History (7)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
You can restrict the tests that run via ant like so:
-
build.xml
439 439 <formatter type="plain"/> 440 440 <formatter type="xml"/> 441 441 <batchtest fork="yes" todir="${test.dir}/report"> 442 <fileset dir="${test.dir}/build/@{testfamily}" includes="**/* Test@{testITsuffix}.class"/>442 <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*JCSCachedTileLoaderJobTest@{testITsuffix}.class"/> 443 443 </batchtest> 444 444 </junit> 445 445 </jacoco:coverage>
If it passes like this, you can figure out which preceding test causes it to fail.
comment:3 Changed 4 years ago by
Been there. This change to ant file prevents triggering the bug :-o
Looks a bit like a Heisenbug
comment:4 Changed 4 years ago by
The idea is to make a long list of all available tests and copy & paste them into the ant file like so:
-
build.xml
439 439 <formatter type="plain"/> 440 440 <formatter type="xml"/> 441 441 <batchtest fork="yes" todir="${test.dir}/report"> 442 <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test@{testITsuffix}.class"/> 442 <fileset dir="${test.dir}/build/@{testfamily}"> 443 <include name="**/org/openstreetmap/josm/data/BoundariesTestIT.class"/> 444 <include name="**/org/openstreetmap/josm/data/imagery/ImageryCompareTestIT.class"/> 445 ... 446 </fileset> 443 447 </batchtest> 444 448 </junit> 445 449 </jacoco:coverage>
If the order is the same as in the wildcard run, the bug will trigger. Then you can start removing other tests until you find the one that is the trigger.
I did this once, it's a lot of fun ...
comment:5 Changed 4 years ago by
Milestone: | → 17.01 |
---|
comment:7 Changed 4 years ago by
Thanks for help bastiK.
I used this part to extract the exact order, in which tests are run
<path id="debug"> <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test@{testITsuffix}.class"/> </path> <pathconvert property="echo.path.compile" refid="debug" pathsep="${line.separator}"></pathconvert> <echo>${echo.path.compile}</echo>
And then set my junit fileset to (after identifying interlocked tests):
<batchtest fork="yes" todir="${test.dir}/report"> <fileset dir="${test.dir}/build/@{testfamily}/"> <include name="**/org/openstreetmap/josm/data/cache/HostLimitQueueTest@{testITsuffix}.class" /> <include name="**/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest@{testITsuffix}.class" /> </fileset>
Yes, I'm investigating this from some time. I can only reproduce this when running tests on full blown Ubuntu via ant. Running it on debian/jessie via Docker or Alpine Linux via Docker, directly on Windows - it all passes.
No chances though for attaching debugger.