Skip to content

Commit

Permalink
[misc] XA test correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Oct 16, 2024
1 parent a66f05d commit a81f0e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/org/mariadb/jdbc/integration/XaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private int test2PhaseCommit(boolean doCommit, XADataSource dataSource) throws E
for (int i = 0; i < connectionNumber; i++) {
try {
if (xaConnections[i] != null) {
xaConnections[i].getConnection().close();
xaConnections[i].close();
}
} catch (Exception e) {
e.printStackTrace();
Expand Down Expand Up @@ -396,7 +396,8 @@ public void errorCodeTest() throws SQLException, XAException {
xaResource.commit(xid, true);
fail();
} catch (XAException xae) {
assertEquals(XAException.XAER_INVAL, xae.errorCode); // 1398
assertTrue(XAException.XAER_INVAL == xae.errorCode
|| XAException.XAER_NOTA == xae.errorCode); // 1398
}
xaResource.start(xid2, XAResource.TMNOFLAGS);
xaResource.end(xid2, XAResource.TMSUCCESS);
Expand Down

0 comments on commit a81f0e3

Please sign in to comment.