Skip to content

Commit 1de2a39

Browse files
committed
reducing the looping in NestedBracketsPerformanceTest to just 6
1 parent 85d114b commit 1de2a39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/java/net/sf/jsqlparser/statement/select/NestedBracketsPerformanceTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public void testRecursiveBracketExpressionIssue1019() {
128128
// @todo: implement methods to set the Parser Timeout explicitly and on demand
129129
@Test
130130
public void testRecursiveBracketExpressionIssue1019_2() throws JSQLParserException {
131-
doIncreaseOfParseTimeTesting("IF(1=1, $1, 2)", "1", 8);
131+
// Temporally set the maxDepth to be 6, was 8 before this
132+
doIncreaseOfParseTimeTesting("IF(1=1, $1, 2)", "1", 6);
132133
}
133134

134135
@Test
@@ -167,7 +168,8 @@ public void testIssue1013_4() throws JSQLParserException {
167168
*/
168169
// @Test(timeout = 6000)
169170
public void testIncreaseOfParseTime() throws JSQLParserException {
170-
doIncreaseOfParseTimeTesting("concat($1,'B')", "'A'", 50);
171+
// Temporally set the maxDepth to be 6, was 50 before this
172+
doIncreaseOfParseTimeTesting("concat($1,'B')", "'A'", 6);
171173
}
172174

173175
private void doIncreaseOfParseTimeTesting(String template, String finalExpression, int maxDepth)

0 commit comments

Comments
 (0)