Skip to content

Commit

Permalink
disable some tests on MySQL due to HHH-16989
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Jul 25, 2023
1 parent d3a1b4f commit cbc5724
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,6 @@ public void testCastFunction(SessionFactoryScope scope) {
.list();
session.createQuery("select cast(e.id as BigInteger(10)), cast(e.theDouble as BigDecimal(10,5)) from EntityOfBasics e", Object[].class)
.list();
session.createQuery("select cast(e.theString as String(15)), cast(e.theDouble as String(17)) from EntityOfBasics e", Object[].class)
.list();

session.createQuery( "select cast('1002342345234523.452435245245243' as BigDecimal) from EntityOfBasics", BigDecimal.class)
.list();
Expand Down Expand Up @@ -1000,6 +998,7 @@ public void testCastDoubleToString(SessionFactoryScope scope) {

@Test
@RequiresDialectFeature( feature = DialectFeatureChecks.SupportsTruncateThroughCast.class)
@SkipForDialect(dialectClass = MySQLDialect.class, matchSubTypes = true, reason = "We need to fix this, see HHH-16989")
public void testCastFunction_withTruncation(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
Expand All @@ -1019,6 +1018,18 @@ public void testCastFunctionBinary(SessionFactoryScope scope) {
session -> {
session.createQuery("select cast(e.theString as Binary) from EntityOfBasics e", byte[].class)
.list();
}
);
}

@Test
@SkipForDialect(dialectClass = MySQLDialect.class, matchSubTypes = true, reason = "We need to fix this, see HHH-16989")
@SkipForDialect(dialectClass = DerbyDialect.class, reason = "Derby doesn't support casting to the binary types")
public void testCastFunctionWithLength(SessionFactoryScope scope) {
scope.inTransaction(
session -> {
session.createQuery("select cast(e.theString as String(15)), cast(e.theDouble as String(17)) from EntityOfBasics e", Object[].class)
.list();
session.createQuery("select cast(e.theString as Binary(10)) from EntityOfBasics e", byte[].class)
.list();
}
Expand Down

0 comments on commit cbc5724

Please sign in to comment.