Skip to content
Permalink
Browse files

[CONJ-642] travis correction to permit testing option "rewriteBatched…

…Statements" - part 2

(cherry picked from commit a3ee75b)
  • Loading branch information...
rusher committed Sep 4, 2018
1 parent f25cebb commit a6a2ebad11e75b8a8a0290697c49d1e450919300
Showing with 17 additions and 7 deletions.
  1. +17 −7 src/test/java/org/mariadb/jdbc/MultiTest.java
@@ -52,15 +52,25 @@

package org.mariadb.jdbc;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLIntegrityConstraintViolationException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.util.Properties;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;

import java.sql.*;
import java.util.Properties;

import static org.junit.Assert.*;


public class MultiTest extends BaseTest {

@@ -945,7 +955,7 @@ private void continueOnBatchError(boolean continueBatch, boolean serverPrepare,

int[] updateCount = e.getUpdateCounts();
assertEquals(10, updateCount.length);
if (rewrite || (sharedOptions().useBulkStmts && isMariadbServer() && minVersion(10, 2))) {
if (rewrite) {
//rewrite exception is all or nothing
assertEquals(Statement.EXECUTE_FAILED, updateCount[0]);
assertEquals(Statement.EXECUTE_FAILED, updateCount[1]);
@@ -987,7 +997,7 @@ private void continueOnBatchError(boolean continueBatch, boolean serverPrepare,

ResultSet rs = connection.createStatement().executeQuery("SELECT * FROM MultiTestt9");
//check result
if (!rewrite && !(sharedOptions().useBulkStmts && isMariadbServer() && minVersion(10, 2))) {
if (!rewrite) {
checkNextData(0, rs);
checkNextData(1, rs);
checkNextData(2, rs);

0 comments on commit a6a2eba

Please sign in to comment.
You can’t perform that action at this time.