Skip to content

Commit

Permalink
fix(deps): update spring core to v6.2.0 (#2941)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: M.P. Korstanje <rien.korstanje@gmail.com>
  • Loading branch information
renovate[bot] and mpkorstanje authored Nov 15, 2024
1 parent b0ce107 commit 2447db9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cucumber-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<apiguardian-api.version>1.1.2</apiguardian-api.version>
<hamcrest.version>3.0</hamcrest.version>
<junit-jupiter.version>5.11.3</junit-jupiter.version>
<spring.version>6.1.14</spring.version>
<spring.version>6.2.0</spring.version>
<project.Automatic-Module-Name>io.cucumber.spring</project.Automatic-Module-Name>
<mockito.version>5.14.2</mockito.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration;

import java.util.Optional;
Expand Down Expand Up @@ -322,20 +324,9 @@ void shouldThrowWhenGlueScopedSpringBeanAreUsedOutsideLifecycle() {
}

@Test
void shouldBeStoppableWhenFacedWithInvalidConfiguration() {
void shouldBeStoppableWhenFacedWithBrokenContextConfiguration() {
final ObjectFactory factory = new SpringFactory();
factory.addClass(WithEmptySpringAnnotations.class);

IllegalStateException exception = assertThrows(IllegalStateException.class, factory::start);
assertThat(exception.getMessage(),
containsString("DelegatingSmartContextLoader was unable to detect defaults"));
assertDoesNotThrow(factory::stop);
}

@Test
void shouldBeStoppableWhenFacedWithMissingContextConfiguration() {
final ObjectFactory factory = new SpringFactory();
factory.addClass(WithoutContextConfiguration.class);
factory.addClass(WithBrokenContextConfiguration.class);

IllegalStateException exception = assertThrows(IllegalStateException.class, factory::start);
assertThat(exception.getMessage(), containsString("Failed to load ApplicationContext"));
Expand Down Expand Up @@ -392,13 +383,17 @@ public String getProperty() {
}

@CucumberContextConfiguration
@ContextConfiguration
public static class WithEmptySpringAnnotations {
public static class WithBrokenContextConfiguration {

}
@Configuration
public static class BrokenConfiguration {

@CucumberContextConfiguration
public static class WithoutContextConfiguration {
@Bean
public Object brokenBean() {
throw new RuntimeException("Oops!");
}

}

}

Expand Down

0 comments on commit 2447db9

Please sign in to comment.