Ignore:
Timestamp:
2020-10-07T20:42:43+02:00 (4 years ago)
Author:
simon04
Message:

fix #19704 - DateUtils: sychronization is no longer needed thanks to JSR 310

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java

    r16182 r17104  
    1010import java.text.DateFormat;
    1111import java.util.Date;
     12import java.util.Random;
    1213import java.util.TimeZone;
    13 
     14import java.util.concurrent.ForkJoinPool;
     15
     16import org.junit.Ignore;
    1417import org.junit.Rule;
    1518import org.junit.Test;
     
    192195
    193196        // Local time
    194         TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
     197        setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
    195198        assertEquals(1459688400000L, DateUtils.tsFromString("03-APR-16 15:00:00"));
     199    }
     200
     201    @Test
     202    @Ignore("slow; use for thread safety testing")
     203    public void testTsFromString800k() throws Exception {
     204        new ForkJoinPool(64).submit(() -> new Random()
     205                .longs(800_000)
     206                .parallel()
     207                .forEach(ignore -> testTsFromString())).get();
    196208    }
    197209
Note: See TracChangeset for help on using the changeset viewer.