Skip to content

Commit a09877c

Browse files
jukziiloveeclipse
authored andcommitted
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 <[email protected]> Reviewed-by: Andrey Loskutov <[email protected]>
1 parent 90e86a1 commit a09877c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/LineTrackerTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.eclipse.debug.core.ILaunchManager;
2424
import org.eclipse.debug.core.model.IBreakpoint;
2525
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
26+
import org.eclipse.debug.internal.ui.DebugUIPlugin;
27+
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
2628
import org.eclipse.debug.ui.console.IConsole;
2729
import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
2830
import org.eclipse.jdt.debug.core.IJavaDebugTarget;
@@ -154,7 +156,9 @@ public void testNoPrintln() throws Exception {
154156
public void testFlood() throws Exception {
155157
ConsoleLineTracker.setDelegate(this);
156158
ILaunch launch = null;
159+
final IPreferenceStore debugPrefStore = DebugUIPlugin.getDefault().getPreferenceStore();
157160
try {
161+
debugPrefStore.setValue(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, false);
158162
ILaunchConfiguration config = getLaunchConfiguration("FloodConsole");
159163
assertNotNull("Could not locate launch configuration", config);
160164
launch = config.launch(ILaunchManager.RUN_MODE, null);
@@ -169,6 +173,7 @@ public void testFlood() throws Exception {
169173
// Should be 10,000 lines
170174
assertEquals("Wrong number of lines", 10000, fLinesRead.size());
171175
} finally {
176+
debugPrefStore.setValue(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, true);
172177
ConsoleLineTracker.setDelegate(null);
173178
launch.getProcesses()[0].terminate();
174179
DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);

0 commit comments

Comments
 (0)