Permalink
Browse files

[JENKINS-24903] Added a test to reproduce a catastrophic backtracking…

… regular expression.
  • Loading branch information...
ikedam committed Nov 22, 2015
1 parent d46742e commit 4012e4cd8b6a22c9e7ff534d46d7d4058e42fd20
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
@@ -235,4 +235,21 @@ public boolean apply(FreeStyleBuild b) {
}
).size());
}

@Bug(24903)
public void testCatastorophicRegularExpression() throws Exception {
FreeStyleProject p = createFreeStyleProject();
p.getBuildersList().add(new MyBuilder("0000000000000000000000000000000000000000000000000000", Result.FAILURE));
p.getPublishersList().add(new NaginatorPublisher(
"(0*)*NOSUCHSTRING", // regexpForRerun
false, // rerunIfUnstable
false, // rerunMatrixPart
true, // checkRegexp
1, // maxSchedule
new FixedDelay(0) // delay
));

p.scheduleBuild2(0);
waitUntilNoActivityUpTo(10 * 1000);
}
}

0 comments on commit 4012e4c

Please sign in to comment.