Skip to content

Commit

Permalink
Increase lines to make it run longer. Test completes sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
tszmytka committed Aug 31, 2020
1 parent e6d276f commit baf71a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@

import java.util.Optional;
import java.util.UUID;
import java.util.logging.Logger;

import static hudson.plugins.ansicolor.action.ActionNote.TAG_ACTION_BEGIN;

/**
* Action for issuing commands to ColorConsoleAnnotator
*/
public class ColorizedAction extends InvisibleAction {
private static final Logger LOGGER = Logger.getLogger(ColorizedAction.class.getName());
private static final String TAG_PIPELINE_INTERNAL = "<span class=\"pipeline-new-node\"";
static final ColorizedAction CONTINUE = new ColorizedAction("", Command.CONTINUE);
static final ColorizedAction IGNORE = new ColorizedAction("", Command.IGNORE);
Expand Down Expand Up @@ -96,8 +98,9 @@ public static ColorizedAction parseAction(MarkupText text, Run<?, ?> run) {
if (line.contains(TAG_PIPELINE_INTERNAL)) {
return IGNORE;
}

if (run.isBuilding()) {
final boolean isBuilding = run.isBuilding();
LOGGER.fine("Run is building: " + isBuilding);
if (isBuilding) {
Optional<ColorizedAction> currentAction = run.getActions(ColorizedAction.class).stream()
.filter(a -> Command.CURRENT.equals(a.getCommand()))
.findFirst();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void canRenderLongOutputWhileBuildStillRunning() {
public void evaluate() throws Throwable {
final String a1k = JenkinsTestSupport.repeat("a", 1024);
final String script = "ansiColor('xterm') {\n" +
"for (i = 0; i < 500; i++) {" +
"for (i = 0; i < 1000; i++) {" +
"echo '\033[32m" + a1k + "\033[0m'\n" +
"}" +
"}";
Expand Down

0 comments on commit baf71a8

Please sign in to comment.