sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Szabolcs Vasas <vasas.szabo...@gmail.com>
Subject Re: Review Request 66353: Connection resource related issues in DBOutputFormat and OracleManager
Date Wed, 11 Apr 2018 13:52:18 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66353/#review200907
-----------------------------------------------------------



Hi László,

Thank you for adding a test case, I have left one comment on it?
Do you plan to add another test case for the change in DBOutputFormat? I think it could be
pretty easily added after applying an extract method refactoring.


src/test/org/apache/sqoop/manager/TestOracleManager.java
Lines 70 (patched)
<https://reviews.apache.org/r/66353/#comment281807>

    This test can pass when SQLException is not thrown so it can give a false green sign.
I suggest using ExpectedException rule here.


- Szabolcs Vasas


On April 6, 2018, 1:26 p.m., Laszlo Bodor wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66353/
> -----------------------------------------------------------
> 
> (Updated April 6, 2018, 1:26 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-3306
>     https://issues.apache.org/jira/browse/SQOOP-3306
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> A fortify scan showed 2 possible resource leaks.
> 
> 1: The function getRecordWriter() in DBOutputFormat.java sometimes fails to release a
database resource allocated by getConnection() on line 117.
> In the file DBOutputFormat.java similar issues were on line numbers 117
> 
> 2: The function makeConnection() in OracleManager.java sometimes fails to release a database
resource allocated by getConnection() on line 321.
> In the file OracleManager.java similar issues were on line numbers 321
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/manager/OracleManager.java 929b5061 
>   src/java/org/apache/sqoop/mapreduce/db/DBOutputFormat.java 730ff286 
>   src/test/org/apache/sqoop/manager/TestOracleManager.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66353/diff/2/
> 
> 
> Testing
> -------
> 
> ant test
> 
> 
> Thanks,
> 
> Laszlo Bodor
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message