Bug 579439 - adapt LineTrackerTests.testFlood

The tests logs more then the default buffer size can keep. And logs
faster then the console can draw. With the changes of bug 575275 the
console is only formated for the visible portion of the console buffer.

see
org.eclipse.ui.internal.console.IOConsolePartitioner.checkBufferSize()

Fix for the test: unlimit the console buffer during this test.

Change-Id: I69803f63816469570bab9d49c4ddf2c33875a44a
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/192281
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
index ea71e0f..cb56b95 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java
@@ -23,6 +23,8 @@
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
 import org.eclipse.debug.ui.console.IConsole;
 import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
@@ -154,7 +156,9 @@
 	public void testFlood() throws Exception {
 		ConsoleLineTracker.setDelegate(this);
 		ILaunch launch = null;
+		final IPreferenceStore debugPrefStore = DebugUIPlugin.getDefault().getPreferenceStore();
 		try {
+			debugPrefStore.setValue(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, false);
 			ILaunchConfiguration config = getLaunchConfiguration("FloodConsole");
 			assertNotNull("Could not locate launch configuration", config);
 			launch = config.launch(ILaunchManager.RUN_MODE, null);
@@ -169,6 +173,7 @@
 			// Should be 10,000 lines
 			assertEquals("Wrong number of lines", 10000, fLinesRead.size());
 		} finally {
+			debugPrefStore.setValue(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, true);
 			ConsoleLineTracker.setDelegate(null);
 			launch.getProcesses()[0].terminate();
 			DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);