You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/02/13 01:42:13 UTC
incubator-nifi git commit: NIFI-282: Updated unit test
Repository: incubator-nifi
Updated Branches:
refs/heads/nifi-site-to-site-client 5c8a9e22d -> 8f0402fbb
NIFI-282: Updated unit test
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8f0402fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8f0402fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8f0402fb
Branch: refs/heads/nifi-site-to-site-client
Commit: 8f0402fbbc75dc20ab226bb05f7cd38df6f929d6
Parents: 5c8a9e2
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Feb 12 19:41:51 2015 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Feb 12 19:41:51 2015 -0500
----------------------------------------------------------------------
.../client/socket/TestSiteToSiteClient.java | 46 ++++++++++----------
1 file changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f0402fb/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java b/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
index 75becd3..8781421 100644
--- a/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
+++ b/nifi/nifi-commons/nifi-site-to-site-client/src/test/java/org/apache/nifi/remote/client/socket/TestSiteToSiteClient.java
@@ -36,7 +36,7 @@ import org.junit.Test;
public class TestSiteToSiteClient {
@Test
- //@Ignore("For local testing only; not really a unit test but a manual test")
+ @Ignore("For local testing only; not really a unit test but a manual test")
public void testReceive() throws IOException {
System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi.remote", "DEBUG");
@@ -71,31 +71,31 @@ public class TestSiteToSiteClient {
@Test
- //@Ignore("For local testing only; not really a unit test but a manual test")
+ @Ignore("For local testing only; not really a unit test but a manual test")
public void testSend() throws IOException {
System.setProperty("org.slf4j.simpleLogger.log.org.apache.nifi.remote", "DEBUG");
- final SiteToSiteClient client = new SiteToSiteClient.Builder()
- .url("http://localhost:8080/nifi")
- .portName("input")
- .build();
-
- try {
- final Transaction transaction = client.createTransaction(TransferDirection.SEND);
- Assert.assertNotNull(transaction);
-
- final Map<String, String> attrs = new HashMap<>();
- attrs.put("site-to-site", "yes, please!");
- final byte[] bytes = "Hello".getBytes();
- final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- final DataPacket packet = new StandardDataPacket(attrs, bais, bytes.length);
- transaction.send(packet);
-
- transaction.confirm();
- transaction.complete();
- } finally {
- client.close();
- }
+ final SiteToSiteClient client = new SiteToSiteClient.Builder()
+ .url("http://localhost:8080/nifi")
+ .portName("input")
+ .build();
+
+ try {
+ final Transaction transaction = client.createTransaction(TransferDirection.SEND);
+ Assert.assertNotNull(transaction);
+
+ final Map<String, String> attrs = new HashMap<>();
+ attrs.put("site-to-site", "yes, please!");
+ final byte[] bytes = "Hello".getBytes();
+ final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ final DataPacket packet = new StandardDataPacket(attrs, bais, bytes.length);
+ transaction.send(packet);
+
+ transaction.confirm();
+ transaction.complete();
+ } finally {
+ client.close();
+ }
}
}