david-streamlio commented on a change in pull request #9406:
URL: https://github.com/apache/pulsar/pull/9406#discussion_r581289384



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/io/PulsarFunctionE2ETest.java
##########
@@ -266,6 +270,28 @@ void setup(Method method) throws Exception {
         fileServerThread = new Thread(() -> {
             try {
                 fileServer = HttpServer.create(new InetSocketAddress(0), 0);
+                
fileServer.createContext("/pulsar-io-batch-data-generator.nar", he -> {
+                    try {
+
+                        Headers headers = he.getResponseHeaders();
+                        headers.add("Content-Type", 
"application/octet-stream");
+
+                        File file = new 
File(getClass().getClassLoader().getResource("pulsar-io-batch-data-generator.nar").getFile());
+                        byte[] bytes  = new byte [(int)file.length()];
+
+                        FileInputStream fileInputStream = new 
FileInputStream(file);

Review comment:
       I have rebased onto the current master branch and added code to close 
all the opened input streams in the code




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to