Modify

Opened 8 years ago

Last modified 6 years ago

#13099 new defect

Broken unit test: org.openstreetmap.josm.data.osm.ChangesetCacheTest.fireingEventsAddAChangeset

Reported by: michael2402 Owned by: team
Priority: normal Milestone:
Component: Unit tests Version:
Keywords: junit Cc:

Description

An assertion fails during this unit test, the assertion failure is not detected:

    [junit] Testsuite: org.openstreetmap.josm.data.osm.ChangesetCacheTest
    [junit] Exception in thread "AWT-EventQueue-0" Assertion failed: 
    [junit] 
    [junit] assert event.getAddedChangesets().size() == 1
    [junit]        |     |                    |      |
    [junit]        |     []                   0      false
    [junit]        org.openstreetmap.josm.data.osm.DefaultChangesetCacheEvent@1a73fa
    [junit] 
    [junit] 	at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:402)
    [junit] 	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:650)
    [junit] 	at org.openstreetmap.josm.data.osm.ChangesetCacheTest$2.changesetCacheUpdated(ChangesetCacheTest.groovy:108)
    [junit] 	at org.openstreetmap.josm.data.osm.ChangesetCache$1.run(ChangesetCache.java:75)
    [junit] 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    [junit] 	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
    [junit] 	at java.awt.EventQueue.access$500(EventQueue.java:97)
    [junit] 	at java.awt.EventQueue$3.run(EventQueue.java:702)
    [junit] 	at java.awt.EventQueue$3.run(EventQueue.java:696)
    [junit] 	at java.security.AccessController.doPrivileged(Native Method)
    [junit] 	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    [junit] 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
    [junit] 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    [junit] 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    [junit] 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    [junit] 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    [junit] 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    [junit] 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    [junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.107 sec

Attachments (0)

Change History (2)

comment:1 by Don-vip, 8 years ago

Keywords: junit groovy added
Milestone: 16.07

well it seems broken since 2009... This test should be rewritten to move assertions out of listeners code

comment:2 by Don-vip, 6 years ago

Keywords: groovy removed

The test has been converted to Java (#16498) but the assertions still must be moved out from the listeners.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to michael2402.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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