Fix issues with tests - tidy ResetBasicData

This commit is contained in:
Rob Bygrave
2022-01-26 21:47:00 +13:00
parent 774cab327d
commit 7e0ac5a73a
2 changed files with 42 additions and 108 deletions
@@ -6,6 +6,7 @@ import io.ebean.Database;
import io.ebean.annotation.IgnorePlatform;
import io.ebean.annotation.Platform;
import io.ebean.annotation.Transactional;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.tests.model.basic.Customer;
import org.tests.model.basic.ResetBasicData;
@@ -14,6 +15,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class TestBatchSaveWithGetBeanId extends BaseTestCase {
@BeforeAll
static void before() {
ResetBasicData.reset();
}
/**
* Making this transaction with batchSize means that the insert
* below does not occur immediately ... and the getBeanId()
@@ -23,8 +29,6 @@ public class TestBatchSaveWithGetBeanId extends BaseTestCase {
@Test
@IgnorePlatform(Platform.HANA) // HANA doesn't support insert batching
public void test() {
ResetBasicData.reset();
Database server = DB.getDefault();
Customer model = new Customer();
model.setName("foo");