mirror of https://github.com/apache/nifi.git
NIFI-852: Ensure that calling MockProcessSession.transfer(FlowFile, Relationship.SELF) will re-queue the FlowFile
This commit is contained in:
parent
5962404379
commit
1eeed73010
|
@ -552,6 +552,11 @@ public class MockProcessSession implements ProcessSession {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void transfer(final FlowFile flowFile, final Relationship relationship) {
|
public void transfer(final FlowFile flowFile, final Relationship relationship) {
|
||||||
|
if (relationship == Relationship.SELF) {
|
||||||
|
transfer(flowFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
validateState(flowFile);
|
validateState(flowFile);
|
||||||
List<MockFlowFile> list = transferMap.get(relationship);
|
List<MockFlowFile> list = transferMap.get(relationship);
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
|
@ -565,6 +570,11 @@ public class MockProcessSession implements ProcessSession {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void transfer(final Collection<FlowFile> flowFiles, final Relationship relationship) {
|
public void transfer(final Collection<FlowFile> flowFiles, final Relationship relationship) {
|
||||||
|
if (relationship == Relationship.SELF) {
|
||||||
|
transfer(flowFiles);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (final FlowFile flowFile : flowFiles) {
|
for (final FlowFile flowFile : flowFiles) {
|
||||||
validateState(flowFile);
|
validateState(flowFile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue