Croway commented on code in PR #12208:
URL: https://github.com/apache/camel/pull/12208#discussion_r1410509475


##########
components/camel-jetty/src/test/java/org/apache/camel/component/jetty/MultiPartFormTest.java:
##########
@@ -98,7 +98,8 @@ public void process(Exchange exchange) throws Exception {
                         // "text/plain", data.getContentType());
                         assertEquals("log4j2.properties", data.getName(), "Got 
the wrong name");
 
-                        
assertTrue(data.getDataSource().getInputStream().available() > 0,
+                        String fileContent = new 
String(data.getDataSource().getInputStream().readAllBytes());
+                        assertTrue(fileContent.length() > 0,

Review Comment:
   oh yeah, nice, this way the whole stream won't loaded in memory, thanks



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

Reply via email to