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




core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
Lines 1129 (patched)
<https://reviews.apache.org/r/65481/#comment280240>

    Extract method w/ name as the comment suggests, and drop the comment.



core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
Lines 1137 (patched)
<https://reviews.apache.org/r/65481/#comment280239>

    Please use `Assert.assertEquals()` that features a `String message`, and 
have your comment as the `message`. This way, comment will be part of code - 
can't rot!



core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
Lines 1147-1151 (patched)
<https://reviews.apache.org/r/65481/#comment280241>

    Extract method and drop comment.


- András Piros


On March 22, 2018, 4:44 p.m., Kinga Marton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65481/
> -----------------------------------------------------------
> 
> (Updated March 22, 2018, 4:44 p.m.)
> 
> 
> Review request for oozie, András Piros and Attila Sasvari.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> Upon SLACalculatorMemory.addRegistration, Oozie puts an entry into an 
> in-memory concurrent hashmap ("slaMap"), and later persists it in the Oozie 
> database.
> However, if there is a failure during the database operation, a 
> JPAExecutorException is thrown, and the entry is not removed from the SLA map.
> It may introduce inconsistency between the Oozie database and the SLA map.
> To prevent this, a rollback mechanism (with proper logging) should be 
> implemented. It would also make sense to do more sanity/consistency check in 
> the Oozie server.
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java ef019e73 
>   
> core/src/main/java/org/apache/oozie/util/db/AlwaysFailingHSQLDriverMapper.java
>  PRE-CREATION 
>   core/src/main/java/org/apache/oozie/util/db/FailingConnectionWrapper.java 
> 0e310253 
>   core/src/main/java/org/apache/oozie/util/db/FailingDBHelperForTest.java 
> PRE-CREATION 
>   core/src/main/java/org/apache/oozie/util/db/FailingHSQLDBDriverWrapper.java 
> fe9f08b1 
>   core/src/main/java/org/apache/oozie/util/db/FailingMySQLDriverWrapper.java 
> f0e2b181 
>   core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java 
> ee906f45 
> 
> 
> Diff: https://reviews.apache.org/r/65481/diff/5/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kinga Marton
> 
>

Reply via email to