Skip to content
Permalink
Browse files

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

…oreWrapperStep.
  • Loading branch information
jglick committed Mar 31, 2015
1 parent 63179a3 commit 874c4618f43316e096562499f0f6a3636951919a
@@ -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;
22 pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.608-SNAPSHOT</version> <!-- TODO SimpleBuildWrapper-JENKINS-27392 -->
<version>1.607</version> <!-- TODO SimpleBuildWrapper-JENKINS-27392 branch -->
</parent>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-pom</artifactId>
@@ -99,6 +99,26 @@
</dependencies>
</dependencyManagement>
<dependencies>
<dependency> <!-- TODO SimpleBuildWrapper-JENKINS-27392 branch @ a52d665180a7b11dcd64673c3f08b719f6c9f908 -->
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.608-20150331.141653-1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-war</artifactId>
<version>1.608-20150331.141722-1</version>
<type>war</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-war</artifactId>
<version>1.608-20150331.141722-1</version>
<classifier>war-for-test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>

0 comments on commit 874c461

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