mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
[FIXED JENKINS-25759] Avoid consuming too much memory while running validateAntFileMask.
Not fully solved, since the scannedDirs field can still grow to be large, but at least clearing files/dirsNotIncluded. Also imposing a 5s timeout on the scan regardless of file count, and defining a user-customizable bound.
This commit is contained in:
1 parent
b21827b34a
commit
534328b264
5 files changed
+24
-7
No files matched your search
@@ -56,6 +56,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
import org.jvnet.hudson.test.Issue;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@@ -496,11 +497,13 @@ public class FilePathTest extends ChannelTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void assertValidateAntFileMask(String expected, FilePath d, String fileMasks) throws Exception {
|
||||
assertEquals(expected, d.validateAntFileMask(fileMasks));
|
||||
}
|
||||
|
||||
@Bug(7214)
|
||||
@Issue("JENKINS-7214")
|
||||
@SuppressWarnings("deprecation")
|
||||
public void testValidateAntFileMaskBounded() throws Exception {
|
||||
File tmp = Util.createTempDir();
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user