thenatog commented on a change in pull request #5560:
URL: https://github.com/apache/nifi/pull/5560#discussion_r761387671
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenTCPRecord.java
##########
@@ -189,24 +198,17 @@ public void testRunClientAuthNone() throws
InitializationException, IOException,
Assert.assertTrue(content.contains("This is a test " + 3));
}
- protected void run(final int expectedTransferred, final SSLContext
sslContext) throws IOException, InterruptedException {
+ protected void run(final int expectedTransferred, final byte[] data, final
SSLContext sslContext, final boolean shouldInitialize) throws Exception {
final int port = NetworkUtils.availablePort();
runner.setProperty(ListenTCPRecord.PORT, Integer.toString(port));
// Run Processor and start listener without shutting down
- runner.run(1, false, true);
-
- final Thread thread = new Thread(() -> {
- try (final Socket socket = getSocket(port, sslContext)) {
- final OutputStream outputStream = socket.getOutputStream();
- outputStream.write(DATA.getBytes(StandardCharsets.UTF_8));
- outputStream.flush();
- } catch (final IOException e) {
- LOGGER.error("Failed Sending Records to Port [{}]", port, e);
- }
- });
- thread.start();
+ LOGGER.info("Before run:");
+ runner.run(1, false, shouldInitialize);
+ LOGGER.info("About to send messages:");
+ sendMessages(port, data, sslContext);
+ LOGGER.info("Sent messages to port: {}", port);
Review comment:
Sorry yes, these should have been removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]