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
@@ -2,15 +2,16 @@ package org.tests.basic.encrypt;
import io.ebean.BaseTestCase;
import io.ebean.Ebean;
import io.ebean.Platform;
import io.ebean.SqlQuery;
import io.ebean.SqlRow;
import io.ebean.Update;
import io.ebean.annotation.ForPlatform;
import io.ebean.config.dbplatform.DbEncrypt;
import io.ebeaninternal.api.SpiEbeanServer;
import org.tests.model.basic.EBasicEncrypt;
import org.ebeantest.LoggedSqlCollector;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.sql.Date;
@@ -22,13 +23,9 @@ public class TestEncrypt extends BaseTestCase {
@Test
@ForPlatform(Platform.H2) // only run this on H2 - PGCrypto not happy on CI server
public void testQueryBind() {
if (!isH2()) {
// only run this on H2 - PGCrypto not happy on CI server
return;
}
LoggedSqlCollector.start();
Ebean.find(EBasicEncrypt.class)
.where().startsWith("description", "Rob")
@@ -39,8 +36,8 @@ public class TestEncrypt extends BaseTestCase {
assertThat(loggedSql.get(0)).contains("; --bind(****,Rob%)");
}
@Ignore
@Test
@ForPlatform(Platform.H2)
public void test() {
Update<EBasicEncrypt> deleteAll = Ebean.createUpdate(EBasicEncrypt.class, "delete from EBasicEncrypt");