You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by da...@apache.org on 2015/06/10 04:40:36 UTC
[14/21] incubator-nifi git commit: NIFI-632 - improving tests
NIFI-632 - improving tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/f2818d22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/f2818d22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/f2818d22
Branch: refs/heads/NIFI-632
Commit: f2818d2263c807f90761b5697ad3df3c727b23fd
Parents: e4e9efa
Author: danbress <db...@onyxconsults.com>
Authored: Sat May 30 12:14:17 2015 -0400
Committer: danbress <db...@onyxconsults.com>
Committed: Tue Jun 9 21:34:24 2015 -0400
----------------------------------------------------------------------
.../nifi/processors/WriteResourceToStream.java | 8 ++++----
.../nifi/documentation/DocGeneratorTest.java | 4 ++++
.../src/test/resources/lib/example.nar | Bin 720984 -> 721040 bytes
3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f2818d22/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java b/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
index 7849128..5d595b4 100644
--- a/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
+++ b/nifi/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
@@ -35,16 +35,16 @@ import org.apache.nifi.processor.Relationship;
import org.apache.nifi.processor.exception.ProcessException;
import org.apache.nifi.processor.io.OutputStreamCallback;
-@Tags({ "example" })
-@CapabilityDescription("Provide a description")
+@Tags({ "example", "resources" })
+@CapabilityDescription("This example processor loads a resource from the nar and writes it to the FlowFile content")
public class WriteResourceToStream extends AbstractProcessor {
public static final Relationship REL_SUCCESS = new Relationship.Builder()
.name("success")
.description("files that were successfully processed").build();
public static final Relationship REL_FAILURE = new Relationship.Builder()
- .name("success")
- .description("files that were notsuccessfully processed").build();
+ .name("failure")
+ .description("files that were not successfully processed").build();
private Set<Relationship> relationships;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f2818d22/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java
index 83db414..9438601 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/java/org/apache/nifi/documentation/DocGeneratorTest.java
@@ -54,6 +54,10 @@ public class DocGeneratorTest {
Assert.assertTrue(indexHtml + " should have been generated", indexHtml.exists());
String generatedHtml = FileUtils.readFileToString(indexHtml);
Assert.assertNotNull(generatedHtml);
+ Assert.assertTrue(generatedHtml.contains("This example processor loads a resource from the nar and writes it to the FlowFile content"));
+ Assert.assertTrue(generatedHtml.contains("files that were successfully processed"));
+ Assert.assertTrue(generatedHtml.contains("files that were not successfully processed"));
+ Assert.assertTrue(generatedHtml.contains("resources"));
}
private NiFiProperties loadSpecifiedProperties(String propertiesFile) {
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/f2818d22/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar
index 5c0182b..0bca10b 100644
Binary files a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar and b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/test/resources/lib/example.nar differ