Ignore:
Timestamp:
2018-09-02T18:59:44+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16705 - RemoteControlHttpsServer: end mainloop if server.isClosed() (patch by ris)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandlerTest.java

    r12636 r14217  
    2929    @Rule
    3030    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
     31    public JOSMTestRules test = new JOSMTestRules().main().assertionsInEDT().projection();
    3232
    3333    private static AddNodeHandler newHandler(String url) throws RequestHandlerBadRequestException {
     
    5858        thrown.expectMessage("NumberFormatException (empty String)");
    5959        OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null);
    60         try {
    61             MainApplication.getLayerManager().addLayer(layer);
    62             newHandler(null).handle();
    63         } finally {
    64             MainApplication.getLayerManager().removeLayer(layer);
    65         }
     60        MainApplication.getLayerManager().addLayer(layer);
     61        newHandler(null).handle();
    6662    }
    6763
     
    9591    public void testNominalRequest() throws Exception {
    9692        OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null);
    97         try {
    98             MainApplication.getLayerManager().addLayer(layer);
    99             newHandler("https://localhost?lat=0&lon=0").handle();
    100         } finally {
    101             MainApplication.getLayerManager().removeLayer(layer);
    102         }
     93        MainApplication.getLayerManager().addLayer(layer);
     94        newHandler("https://localhost?lat=0&lon=0").handle();
    10395    }
    10496}
Note: See TracChangeset for help on using the changeset viewer.