From a4eec42813cd6f54443111adef1623b8c5fa951a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 5 Oct 2015 14:07:01 +0100 Subject: [PATCH] =?UTF-8?q?Ensure=20that=20new=20JPA-based=20test=20doesn?= =?UTF-8?q?=E2=80=99t=20accidentally=20enable=20Bitronix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flyway/FlywayAutoConfigurationTests.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java index 09f21580b5..011c8a907d 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java @@ -17,11 +17,13 @@ package org.springframework.boot.autoconfigure.flyway; import java.util.Arrays; -import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import javax.sql.DataSource; import org.flywaydb.core.Flyway; +import org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -229,9 +231,11 @@ public class FlywayAutoConfigurationTests { @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean() { + Map properties = new HashMap(); + properties.put("configured", "manually"); + properties.put("hibernate.transaction.jta.platform", NoJtaPlatform.INSTANCE); return new EntityManagerFactoryBuilder(new HibernateJpaVendorAdapter(), - Collections.emptyMap(), null).dataSource( - this.dataSource).build(); + properties, null).dataSource(this.dataSource).build(); } }