mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Update tests only - non native boolean (MySql) and ignore non-named savepoint nested transaction tests with MySql.
This commit is contained in:
@@ -43,8 +43,9 @@ public class TestSoftDeleteStatelessUpdate extends BaseTestCase {
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql.get(0)).contains("update esd_master set name=? where id=?");
|
||||
assertThat(sql.get(1)).contains("update esd_detail set deleted=true where master_id = ? and not");
|
||||
|
||||
if (isPlatformBooleanNative()) {
|
||||
assertThat(sql.get(1)).contains("update esd_detail set deleted=true where master_id = ? and not");
|
||||
}
|
||||
|
||||
EsdMaster fetchedWithSoftDeletes = Ebean.find(EsdMaster.class)
|
||||
.setId(master.getId())
|
||||
@@ -67,8 +68,8 @@ public class TestSoftDeleteStatelessUpdate extends BaseTestCase {
|
||||
|
||||
sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(1);
|
||||
assertThat(sql.get(0)).contains("left join esd_detail t1 on t1.master_id = t0.id and t1.deleted = false where t0.id = ?");
|
||||
|
||||
|
||||
if (isPlatformBooleanNative()) {
|
||||
assertThat(sql.get(0)).contains("left join esd_detail t1 on t1.master_id = t0.id and t1.deleted = false where t0.id = ?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import io.ebean.EbeanServer;
|
||||
import io.ebean.PersistenceContextScope;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.TxScope;
|
||||
import io.ebean.annotation.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import org.junit.Test;
|
||||
import org.tests.model.basic.EBasic;
|
||||
|
||||
@@ -15,6 +17,10 @@ import static org.junit.Assert.assertNull;
|
||||
|
||||
public class TestNestedSubTransaction extends BaseTestCase {
|
||||
|
||||
/**
|
||||
* MySql only supports named savepoints - review.
|
||||
*/
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void ebeanServer_commitTransaction_expect_sameAsTransactionCommit() {
|
||||
|
||||
@@ -59,6 +65,7 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
}
|
||||
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void nestedUseSavepoint_doubleNested_rollbackCommit() {
|
||||
|
||||
@@ -95,6 +102,7 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void nestedUseSavepoint_doubleNested_commitRollback() {
|
||||
|
||||
@@ -131,6 +139,7 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void nestedUseSavepoint_nested_RequiresNew() {
|
||||
|
||||
@@ -166,6 +175,7 @@ public class TestNestedSubTransaction extends BaseTestCase {
|
||||
assertNull(after);
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.MYSQL)
|
||||
@Test
|
||||
public void nestedUseSavepoint() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user