mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2547 - Update BaseTestCase to include CockroachDB
This commit is contained in:
@@ -200,7 +200,7 @@ public abstract class BaseTestCase {
|
||||
}
|
||||
|
||||
public boolean isPostgresCompatible() {
|
||||
return isPostgres() || isYugabyte();
|
||||
return isPostgres() || isYugabyte() || isCockroach();
|
||||
}
|
||||
|
||||
public boolean isPostgres() {
|
||||
@@ -211,6 +211,10 @@ public abstract class BaseTestCase {
|
||||
return Platform.YUGABYTE == platform().base();
|
||||
}
|
||||
|
||||
public boolean isCockroach() {
|
||||
return Platform.COCKROACH == platform().base();
|
||||
}
|
||||
|
||||
public boolean isMySql() {
|
||||
return Platform.MYSQL == platform();
|
||||
}
|
||||
@@ -281,7 +285,7 @@ public abstract class BaseTestCase {
|
||||
* Platform specific IN clause assert.
|
||||
*/
|
||||
protected void platformAssertIn(String sql, String containsIn) {
|
||||
if (isPostgres() || isYugabyte()) {
|
||||
if (isPostgresCompatible()) {
|
||||
assertThat(sql).contains(containsIn+" = any(");
|
||||
} else {
|
||||
assertThat(sql).contains(containsIn+" in ");
|
||||
|
||||
Reference in New Issue
Block a user