Skip to content
Permalink
Browse files
[JENKINS-30103] @jglick recommened to use ThisClass.class.getResource…
…AsStream(..) instead of getClass().getResourceAsStream(..)
  • Loading branch information
recena committed Aug 25, 2015
1 parent 0f8c4d3 commit fa5a0c4bf1b78ff7ed35c8bfbcd1c6eda07d503f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/test/java/hudson/plugins/dry/DryWorkflowTest.java
@@ -33,7 +33,7 @@ public static void init() throws Exception {
public void dryPublisherWorkflowStep() throws Exception {
WorkflowJob job = jenkinsRule.jenkins.createProject(WorkflowJob.class, "dryPublisherWorkflowStep");
FilePath workspace = jenkinsRule.jenkins.getWorkspaceFor(job);
workspace.unzipFrom(getClass().getResourceAsStream("./maven-project1.zip"));
workspace.unzipFrom(DryWorkflowTest.class.getResourceAsStream("./maven-project1.zip"));
job.setDefinition(new CpsFlowDefinition(""
+ "node {\n"
+ " def mvnHome = tool '" + mavenInstallation.getName() + "'\n"
@@ -53,7 +53,7 @@ public void dryPublisherWorkflowStep() throws Exception {
public void dryPublisherWorkflowStepSetLimits() throws Exception {
WorkflowJob job = jenkinsRule.jenkins.createProject(WorkflowJob.class, "dryPublisherWorkflowStepSetLimits");
FilePath workspace = jenkinsRule.jenkins.getWorkspaceFor(job);
workspace.unzipFrom(getClass().getResourceAsStream("./maven-project1.zip"));
workspace.unzipFrom(DryWorkflowTest.class.getResourceAsStream("./maven-project1.zip"));
job.setDefinition(new CpsFlowDefinition(""
+ "node {\n"
+ " def mvnHome = tool '" + mavenInstallation.getName() + "'\n"
@@ -74,7 +74,7 @@ public void dryPublisherWorkflowStepSetLimits() throws Exception {
public void dryPublisherWorkflowStepFailure() throws Exception {
WorkflowJob job = jenkinsRule.jenkins.createProject(WorkflowJob.class, "dryPublisherWorkflowStepFailure");
FilePath workspace = jenkinsRule.jenkins.getWorkspaceFor(job);
workspace.unzipFrom(getClass().getResourceAsStream("./maven-project1.zip"));
workspace.unzipFrom(DryWorkflowTest.class.getResourceAsStream("./maven-project1.zip"));
job.setDefinition(new CpsFlowDefinition(""
+ "node {\n"
+ " def mvnHome = tool '" + mavenInstallation.getName() + "'\n"

0 comments on commit fa5a0c4

Please sign in to comment.