Fix failing tests

See gh-6897
pull/6859/merge
Phillip Webb 8 years ago
parent 5f7897ba41
commit 25c4e261e9

@ -20,7 +20,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;
@ -44,7 +44,7 @@ public class AutoConfigureTestDatabaseWithNoDatabaseIntegrationTests {
assertThat(this.context).isNotNull();
}
@SpringBootConfiguration
@TestConfiguration
static class Config {
}

@ -67,7 +67,8 @@ final class SpringBootConfigurationFinder {
Set<BeanDefinition> components = this.scanner.findCandidateComponents(source);
if (!components.isEmpty()) {
Assert.state(components.size() == 1,
"Found multiple @SpringBootConfiguration annotated classes");
"Found multiple @SpringBootConfiguration annotated classes "
+ components);
return ClassUtils.resolveClassName(
components.iterator().next().getBeanClassName(), null);
}

Loading…
Cancel
Save