[
https://issues.apache.org/jira/browse/NIFI-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334338#comment-15334338
]
ASF GitHub Bot commented on NIFI-1838:
--------------------------------------
Github user PuspenduBanerjee commented on a diff in the pull request:
https://github.com/apache/nifi/pull/534#discussion_r67395014
--- Diff:
nifi-mock/src/test/java/org/apache/nifi/util/TestMockProcessSession.java ---
@@ -55,4 +55,35 @@ public void onTrigger(final ProcessContext ctx, final
ProcessSession session) th
}
}
+
+
+ @Test(expected = AssertionError.class)
+ public void testNonExistentRelationFromProcessor() {
+
TestRunners.newTestRunner(NonExistentRelationTestProcessor.class).run();
+ }
+
+ protected static class NonExistentRelationTestProcessor extends
PoorlyBehavedProcessor {
+
+ static final Relationship REL_NON_EXISTENT = new
Relationship.Builder()
+ .name("NonExistent Relation")
+ .build();
+
+ public Set<Relationship> relationships =
Collections.singleton(REL_FAILURE);
+
+ @Override
+ public Set<Relationship> getRelationships() {
+ return relationships;
--- End diff --
The way groovy test cases are written , they will fail if we return Empty
Relationship. please see NIFI-1838
> Groovy Test Scripts will require refactoring if we implement NIFI-1152
> ----------------------------------------------------------------------
>
> Key: NIFI-1838
> URL: https://issues.apache.org/jira/browse/NIFI-1838
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.0.0, 0.6.1
> Reporter: Puspendu Banerjee
> Labels: patch
> Fix For: 1.0.0
>
> Attachments:
> 0001-Fix-for-NIFI-1838-NIFI-1152-Code-modification-for-ty.patch
>
>
> Groovy Test Scripts will require refractoring we implement NIFI-1152 as they
> don't define Relationships properly
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)