diff --git a/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java b/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java index 28a5524a6ae0..acd390c65ab2 100644 --- a/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java +++ b/spellchecker/testSrc/com/intellij/spellchecker/inspection/SpellcheckerPerformanceTest.java @@ -92,41 +92,41 @@ public class SpellcheckerPerformanceTest extends SpellcheckerInspectionTestCase public void testVeryLongEmail(){ final String text = "\\LONG_EMAIL: " + StringUtil.repeat("ivan.ivanov", 1000000) + "@mail.com\n"; - doSplitterPerformanceTest(text, CommentSplitter.getInstance()); + doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 4000); } public void testVeryLongURL(){ final String text = "\\LONG_URL: http://" + StringUtil.repeat("ivan.ivanov", 1000000) + ".com\n"; - doSplitterPerformanceTest(text, CommentSplitter.getInstance()); + doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 4000); } public void testVeryLongHTML(){ final String text = "\\ LONG_HTML "; - doSplitterPerformanceTest(text, CommentSplitter.getInstance()); + doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 4000); } public void testVeryLongIdentifier(){ final String text = StringUtil.repeat("identifier1", 1000000); - doSplitterPerformanceTest(text, IdentifierSplitter.getInstance()); + doSplitterPerformanceTest(text, IdentifierSplitter.getInstance(), 3000); } public void testVeryLongSpecialCharacters(){ final String text = "word" + StringUtil.repeat("\n\t\r\t\n", 1000000); - doSplitterPerformanceTest(text, TextSplitter.getInstance()); + doSplitterPerformanceTest(text, TextSplitter.getInstance(), 2000); } public void testVeryLongProperty(){ final String text = StringUtil.repeat("properties.test.properties", 1000000); - doSplitterPerformanceTest(text, PropertiesSplitter.getInstance()); + doSplitterPerformanceTest(text, PropertiesSplitter.getInstance(), 4000); } public void testVeryLongList(){ final String text = StringUtil.repeat("properties,test,properties", 1000000); - doSplitterPerformanceTest(text, PlainTextSplitter.getInstance()); + doSplitterPerformanceTest(text, PlainTextSplitter.getInstance(), 2000); } - private static void doSplitterPerformanceTest(String text, Splitter splitter) { - PlatformTestUtil.startPerformanceTest("long word for spelling", 2000, () -> { + private static void doSplitterPerformanceTest(String text, Splitter splitter, int expectedTime) { + PlatformTestUtil.startPerformanceTest("long word for spelling", expectedTime, () -> { try{ splitter.split(text, TextRange.allOf(text), (textRange) -> {}); }catch(ProcessCanceledException pce){