Ignore:
Timestamp:
2017-09-14T00:22:37+02:00 (13 months ago)
Author:
bastiK
Message:

see #15229 - use Config in tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r12842 r12849  
    2828import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2929import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     30import org.openstreetmap.josm.spi.preferences.Config;
    3031import org.openstreetmap.josm.testutils.JOSMTestRules;
    3132
     
    148149        PluginDownloadTask pluginDownloadTask = new PluginDownloadTask(NullProgressMonitor.INSTANCE, plugins, null);
    149150        // Increase default timeout to avoid random network errors on big jar files
    150         int defTimeout = Main.pref.getInt("socket.timeout.read", 30);
    151         Main.pref.putInt("socket.timeout.read", 2 * defTimeout);
     151        int defTimeout = Config.getPref().getInt("socket.timeout.read", 30);
     152        Config.getPref().putInt("socket.timeout.read", 2 * defTimeout);
    152153        pluginDownloadTask.run();
    153154        // Restore default timeout
    154         Main.pref.putInt("socket.timeout.read", defTimeout);
     155        Config.getPref().putInt("socket.timeout.read", defTimeout);
    155156        assertTrue(pluginDownloadTask.getFailedPlugins().toString(), pluginDownloadTask.getFailedPlugins().isEmpty());
    156157        assertEquals(plugins.size(), pluginDownloadTask.getDownloadedPlugins().size());
Note: See TracChangeset for help on using the changeset viewer.