mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
console buffer: treat zero or less as unlimited buffer size (IDEA-201376)
This commit is contained in:
+4
-4
@@ -41,6 +41,7 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
|
||||
private Runnable myTestingStartedHandler;
|
||||
private boolean myFirstTestingStartedEvent = true;
|
||||
private static final String ELLIPSIS = "<...>";
|
||||
private final int myCycleBufferSize = ConsoleBuffer.getCycleBufferSize();
|
||||
|
||||
public OutputToGeneralTestEventsConverter(@NotNull String testFrameworkName, @NotNull TestConsoleProperties consoleProperties) {
|
||||
this(testFrameworkName, consoleProperties.isEditable());
|
||||
@@ -92,10 +93,9 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
|
||||
}
|
||||
|
||||
protected void processConsistentText(String text, final Key outputType, boolean tcLikeFakeOutput) {
|
||||
final int cycleBufferSize = ConsoleBuffer.getCycleBufferSize();
|
||||
if (USE_CYCLE_BUFFER && text.length() > cycleBufferSize) {
|
||||
final StringBuilder builder = new StringBuilder(cycleBufferSize);
|
||||
builder.append(text, 0, cycleBufferSize - OutputLineSplitter.SM_MESSAGE_PREFIX);
|
||||
if (USE_CYCLE_BUFFER && text.length() > myCycleBufferSize && myCycleBufferSize > OutputLineSplitter.SM_MESSAGE_PREFIX) {
|
||||
final StringBuilder builder = new StringBuilder(myCycleBufferSize);
|
||||
builder.append(text, 0, myCycleBufferSize - OutputLineSplitter.SM_MESSAGE_PREFIX);
|
||||
builder.append(ELLIPSIS);
|
||||
builder.append(text, text.length() - OutputLineSplitter.SM_MESSAGE_PREFIX + ELLIPSIS.length(), text.length());
|
||||
text = builder.toString();
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ public class TestResultsXmlFormatter {
|
||||
}
|
||||
lastType.set(contentType);
|
||||
}
|
||||
if (bufferSize < 0 || buffer.length() < bufferSize) {
|
||||
if (bufferSize <= 0 || buffer.length() < bufferSize) {
|
||||
buffer.append(text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user