Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 by anonymous, 9 years ago

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.

comment:2 by bastiK, 9 years ago

You can restrict the tests that run via ant like so:

  • build.xml

     
    439439                    <formatter type="plain"/>
    440440                    <formatter type="xml"/>
    441441                    <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"/>
    443443                    </batchtest>
    444444                </junit>
    445445            </jacoco:coverage>

If it passes like this, you can figure out which preceding test causes it to fail.

comment:3 by wiktorn, 9 years ago

Been there. This change to ant file prevents triggering the bug :-o

Looks a bit like a Heisenbug

comment:4 by bastiK, 9 years ago

The idea is to make a long list of all available tests and copy & paste them into the ant file like so:

  • build.xml

     
    439439                    <formatter type="plain"/>
    440440                    <formatter type="xml"/>
    441441                    <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>
    443447                    </batchtest>
    444448                </junit>
    445449            </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 by Don-vip, 9 years ago

Milestone: 17.01

comment:6 by wiktorn, 9 years ago

Resolution: fixed
Status: newclosed

In 11473/josm:

Always clear cache before tests.

Closes: #14255

comment:7 by wiktorn, 9 years ago

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>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.