Skip to content
Permalink
Browse files

[JENKINS-27392] Using SimpleBuildWrapper.createLoggerDecorator from C…

…oreWrapperStep.

Originally-Committed-As: 874c4618f43316e096562499f0f6a3636951919a
  • Loading branch information
jglick committed Mar 31, 2015
1 parent fe9fd58 commit 60cb60720b2ed1ab64ecaeb72c8c8649dec998b6
@@ -51,7 +51,6 @@
import static org.junit.Assert.*;
import org.junit.Assume;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runners.model.Statement;
@@ -165,7 +164,6 @@
}
}

@Ignore("TODO test prepared")
@Issue("JENKINS-27392")
@Test public void loggerDecorator() throws Exception {
story.addStep(new Statement() {
@@ -29,6 +29,7 @@
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.console.ConsoleLogFilter;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildWrapperDescriptor;
@@ -76,6 +77,10 @@ public SimpleBuildWrapper getDelegate() {
if (!overrides.isEmpty()) {
bodyInvoker.withContext(EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), new ExpanderImpl(overrides)));
}
ConsoleLogFilter filter = step.delegate.createLoggerDecorator(run);
if (filter != null) {
bodyInvoker.withContext(BodyInvoker.mergeConsoleLogFilters(getContext().get(ConsoleLogFilter.class), filter));
}
SimpleBuildWrapper.Disposer disposer = c.getDisposer();
bodyInvoker.withCallback(disposer != null ? new Callback(disposer) : BodyExecutionCallback.wrap(getContext())).start();
return false;

0 comments on commit 60cb607

Please sign in to comment.
You can’t perform that action at this time.