Ignore:
Timestamp:
2020-10-31T01:21:14+01:00 (5 years ago)
Author:
Don-vip
Message:

see #16567 - fix integration tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/AbstractExtendedSourceEntryTestCase.java

    r15100 r17288  
    2020    protected static final List<String> errorsToIgnore = new ArrayList<>();
    2121
    22     /** Entry to test */
    23     protected final ExtendedSourceEntry source;
    24     protected final List<String> ignoredErrors = new ArrayList<>();
    25 
    26     protected AbstractExtendedSourceEntryTestCase(ExtendedSourceEntry source) {
    27         this.source = source;
    28     }
    29 
    3022    protected static List<Object[]> getTestParameters(Collection<ExtendedSourceEntry> entries) throws Exception {
    3123        return entries.stream().map(x -> new Object[] {x.getDisplayName(), cleanUrl(x.url), x}).collect(Collectors.toList());
     
    4840    }
    4941
    50     protected final void handleException(Exception e, Set<String> errors) {
     42    protected final void handleException(ExtendedSourceEntry source, Exception e, Set<String> errors, List<String> ignoredErrors) {
    5143        e.printStackTrace();
    5244        String s = source.url + " => " + e.toString();
    53         if (isIgnoredSubstring(s)) {
     45        if (isIgnoredSubstring(source, s)) {
    5446            ignoredErrors.add(s);
    5547        } else {
     
    5850    }
    5951
    60     protected boolean isIgnoredSubstring(String substring) {
     52    protected boolean isIgnoredSubstring(ExtendedSourceEntry source, String substring) {
    6153        return errorsToIgnore.parallelStream().anyMatch(x -> substring.contains(x) || source.url.contains(x));
    6254    }
Note: See TracChangeset for help on using the changeset viewer.