This is an automated email from the ASF dual-hosted git repository.

mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 10d44898a85d22f7bc88b8c5b59d6b5590828e88
Author: Hussain Towaileb <[email protected]>
AuthorDate: Fri Aug 28 09:59:07 2020 +0300

    [NO ISSUE] Close potentially leaking inputstream in TestExecutor
    
    Details:
    - Close potentially leaking inputstream in TestExecutor.
    
    Change-Id: I61c0874bdb22a27f7462ef02acde3b8347342f33
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7746
    Tested-by: Hussain Towaileb <[email protected]>
    Integration-Tests: Jenkins <[email protected]>
    Reviewed-by: Michael Blow <[email protected]>
    Reviewed-by: Hussain Towaileb <[email protected]>
---
 .../src/test/java/org/apache/asterix/test/common/TestExecutor.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index 8bf2ee5..e586878 100644
--- 
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ 
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -1569,8 +1569,9 @@ public class TestExecutor {
 
     private ExtractedResult executeUpdateOrDdl(String statement, OutputFormat 
outputFormat, URI serviceUri)
             throws Exception {
-        InputStream resultStream = executeQueryService(statement, serviceUri, 
outputFormat, UTF_8);
-        return ResultExtractor.extract(resultStream, UTF_8);
+        try (InputStream resultStream = executeQueryService(statement, 
serviceUri, outputFormat, UTF_8)) {
+            return ResultExtractor.extract(resultStream, UTF_8);
+        }
     }
 
     protected static boolean isExpected(Exception e, CompilationUnit cUnit) {

Reply via email to