Feature/contitional test runner (#1132)

* FIX: warnings (add generics, overrides, fix imports) - should be no effecive code change

* replaced deprecated methods by default methods

* FIX: more compiler warnings

* FIX more warnings - no code changes

* FIX: deprecated call to JsonParseException

* Remove unused code, check unused variables

* ADD: ContitonaltestRunner to skip tests for certain platforms

* Use annotations to control on which platforms a test shoud run

* FIX: compile errors
This commit is contained in:
Roland Praml
2017-09-15 21:03:03 +12:00
committed by Rob Bygrave
parent f3e4696498
commit 8d334ff2e8
17 changed files with 176 additions and 76 deletions
@@ -1,7 +1,9 @@
package org.tests.idkeys;
import io.ebean.BaseTestCase;
import io.ebean.Platform;
import io.ebean.Transaction;
import io.ebean.annotation.ForPlatform;
import io.ebean.config.dbplatform.IdType;
import io.ebeaninternal.api.SpiEbeanServer;
import org.junit.Test;
@@ -17,6 +19,7 @@ import static org.junit.Assert.*;
public class TestGeneratedKeys extends BaseTestCase {
@Test
@ForPlatform(Platform.H2) // readSequenceValue is H2 specific
public void testSequence() throws SQLException {
SpiEbeanServer server = spiEbeanServer();
IdType idType = server.getDatabasePlatform().getDbIdentity().getIdType();
@@ -24,10 +27,6 @@ public class TestGeneratedKeys extends BaseTestCase {
// only run this test when SEQUENCE is being used
return;
}
if (!isH2()) {
// readSequenceValue is H2 specific
return;
}
Transaction tx = server.beginTransaction();