Skip to content

Commit

Permalink
Merge pull request database-rider#44 from empyrosx/master
Browse files Browse the repository at this point in the history
Transactional interceptor doesn't close transaction when test falls down by assert
  • Loading branch information
rmpestano authored Oct 2, 2017
2 parents 2e737f6 + 083992d commit 464d622
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,11 @@ public Object intercept(InvocationContext invocationContext)
if(expectedDataSet != null){
dataSetProcessor.compareCurrentDataSetWith(new DataSetConfig(expectedDataSet.value()).disableConstraints(true),expectedDataSet.ignoreCols());
}

}catch (Exception e){
} finally {
if(isTransactionalTest && em.getTransaction().isActive()){
em.getTransaction().rollback();
}
throw e;
} finally {

int openConnectionsAfter = 0;
if(leakHunter != null){
openConnectionsAfter = leakHunter.openConnections();
Expand Down

0 comments on commit 464d622

Please sign in to comment.