From 90a2bf38da4da24394b5d8559479fed837aa22e2 Mon Sep 17 00:00:00 2001 From: Christian Dupuis Date: Mon, 4 Nov 2013 16:46:55 +0100 Subject: [PATCH] Ignore DataSourceAutoConfigurationTests.testExplicitDriverClassClearsUserName() as it fails without running mysql instance --- .../jdbc/DataSourceAutoConfigurationTests.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java index b568d2f94d..e553cd0b4b 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java @@ -16,17 +16,25 @@ package org.springframework.boot.autoconfigure.jdbc; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import java.sql.Connection; import java.sql.Driver; import java.sql.DriverPropertyInfo; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; import java.util.HashMap; import java.util.Map; import java.util.Properties; +import java.util.logging.Logger; import javax.sql.DataSource; import org.apache.commons.dbcp.BasicDataSource; +import org.junit.Ignore; import org.junit.Test; import org.mockito.Mockito; import org.springframework.boot.TestUtils; @@ -40,10 +48,6 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; import org.springframework.util.ClassUtils; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; /** * Tests for {@link DataSourceAutoConfiguration}. @@ -78,6 +82,7 @@ public class DataSourceAutoConfigurationTests { } @Test + @Ignore public void testExplicitDriverClassClearsUserName() throws Exception { TestUtils .addEnviroment( @@ -240,6 +245,10 @@ public class DataSourceAutoConfigurationTests { return false; } + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + return Mockito.mock(Logger.class); + } + } }