Exception tests modernized.

This commit is contained in:
offa committed 2021-07-13 16:48:11 +02:00
1 parent 97d919c971
commit d37a460c84
16 files changed
+91 -185

No files matched your search

+1 -7
View File
@@ -82,7 +82,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
import static org.mockito.Mockito.mock;
@@ -566,12 +565,7 @@ public class FilePathTest {
assertNull(d.validateAntFileMask("d1/d2/**/f.txt"));
assertNull(d.validateAntFileMask("d1/d2/**/f.txt", 10));
assertEquals(Messages.FilePath_validateAntFileMask_portionMatchButPreviousNotMatchAndSuggest("**/*.js", "**", "**/*.js"), d.validateAntFileMask("**/*.js", 1000));
try {
d.validateAntFileMask("**/*.js", 10);
fail();
} catch (InterruptedException x) {
// good
}
assertThrows(InterruptedException.class, () -> d.validateAntFileMask("**/*.js", 10));
}
@Issue("JENKINS-5253")