eolivelli commented on a change in pull request #9406:
URL: https://github.com/apache/pulsar/pull/9406#discussion_r580858077



##########
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:
       please close this resource




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