Ticket #16656: v1-0001-appveyor-MainApplicationTest-skip-testSetupUIMana.patch

File v1-0001-appveyor-MainApplicationTest-skip-testSetupUIMana.patch, 1.9 KB (added by ris, 8 years ago)
  • test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java

    From 522fc0059f30cbe94ddb71c7b484e83ad2203bdf Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Sat, 31 Mar 2018 23:47:01 +0100
    Subject: [PATCH v1 1/5] appveyor: MainApplicationTest: skip testSetupUIManager
     on appveyor as it is a known crasher
    
    ---
     test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java b/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
    index 33beaeb7c..e261f33ce 100644
    a b import static org.junit.Assert.assertFalse;  
    66import static org.junit.Assert.assertNotNull;
    77import static org.junit.Assert.assertNull;
    88import static org.junit.Assert.assertTrue;
     9import static org.junit.Assume.assumeFalse;
    910
    1011import java.awt.BorderLayout;
    1112import java.awt.event.KeyEvent;
    public class MainApplicationTest {  
    5758     */
    5859    @Rule
    5960    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    60     public JOSMTestRules test = new JOSMTestRules().main().projection().https().devAPI().timeout(20000);
     61    public JOSMTestRules test = new JOSMTestRules().main().projection().https().devAPI().timeout(20000).platform();
    6162
    6263    /**
    6364     * Make sure {@link MainApplication#contentPanePrivate} is initialized.
    public class MainApplicationTest {  
    194195     */
    195196    @Test
    196197    public void testSetupUIManager() {
     198        assumeFalse(PlatformManager.isPlatformWindows() && "True".equals(System.getenv("APPVEYOR")));
    197199        MainApplication.setupUIManager();
    198200        assertEquals(Config.getPref().get("laf", PlatformManager.getPlatform().getDefaultStyle()),
    199201                UIManager.getLookAndFeel().getClass().getCanonicalName());