Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify fix for timing of parallels with single long steps [JENKINS-38…
…536]
- Loading branch information
Showing
4 changed files
with
431 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/test/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/NoOpChunkFinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.jenkinsci.plugins.workflow.pipelinegraphanalysis; | ||
|
||
import org.jenkinsci.plugins.workflow.graph.FlowNode; | ||
import org.jenkinsci.plugins.workflow.graphanalysis.ChunkFinder; | ||
import org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner; | ||
import org.jenkinsci.plugins.workflow.graphanalysis.SimpleChunkVisitor; | ||
|
||
import javax.annotation.CheckForNull; | ||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* For test use: a ChunkFinder that never returns chunks, to use in testing parallel handling only. | ||
* All {@link FlowNode}s will this result in calling {@link SimpleChunkVisitor#atomNode(FlowNode, FlowNode, FlowNode, ForkScanner)} | ||
*/ | ||
public class NoOpChunkFinder implements ChunkFinder { | ||
@Override | ||
public boolean isStartInsideChunk() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isChunkStart(@Nonnull FlowNode current, @CheckForNull FlowNode previous) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isChunkEnd(@Nonnull FlowNode current, @CheckForNull FlowNode previous) { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.