Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12508 closed defect (fixed)

Exception in `MoveCommandTest` and others

Reported by: bastiK Owned by: team
Priority: normal Milestone: 16.02
Component: Unit tests Version:
Keywords: junit fixture Cc: Don-vip


I get a NPE when running the MoveCommandTest and similar tests with Netbeans:

Testcase: equalsContract(org.openstreetmap.josm.command.MoveCommandTest):	Caused an ERROR
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.<init>(
	at org.openstreetmap.josm.command.MoveCommandTest.equalsContract(

Test org.openstreetmap.josm.command.MoveCommandTest FAILED

Looks to me as if Main.pref is indeed not initialized. What am I missing?

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Don-vip

Probably the test needs fixture to be run independently. On Jenkins, all tests share the same JVM state, so if a test creates a fixture, it is reused by tests run after. I may have missed some fixtures in the tests I wrote recently.

Last edited 8 years ago by Don-vip (previous) (diff)

comment:2 Changed 8 years ago by Don-vip

Keywords: junit fixture added
Milestone: 16.02

comment:3 Changed 8 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 9761/josm:

fix #12508 - add missing fixtures for command unit tests

comment:4 Changed 8 years ago by bastiK

In 9763/josm:

see #12508 - add missing fixtures for unit test

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.