Skip to content

Commit 2447db9

Browse files
fix(deps): update spring core to v6.2.0 (#2941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: M.P. Korstanje <[email protected]>
1 parent b0ce107 commit 2447db9

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

cucumber-spring/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<apiguardian-api.version>1.1.2</apiguardian-api.version>
1616
<hamcrest.version>3.0</hamcrest.version>
1717
<junit-jupiter.version>5.11.3</junit-jupiter.version>
18-
<spring.version>6.1.14</spring.version>
18+
<spring.version>6.2.0</spring.version>
1919
<project.Automatic-Module-Name>io.cucumber.spring</project.Automatic-Module-Name>
2020
<mockito.version>5.14.2</mockito.version>
2121
</properties>

cucumber-spring/src/test/java/io/cucumber/spring/SpringFactoryTest.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.springframework.beans.factory.BeanCreationException;
2424
import org.springframework.beans.factory.annotation.Autowired;
2525
import org.springframework.beans.factory.annotation.Value;
26+
import org.springframework.context.annotation.Bean;
27+
import org.springframework.context.annotation.Configuration;
2628
import org.springframework.test.context.ContextConfiguration;
2729

2830
import java.util.Optional;
@@ -322,20 +324,9 @@ void shouldThrowWhenGlueScopedSpringBeanAreUsedOutsideLifecycle() {
322324
}
323325

324326
@Test
325-
void shouldBeStoppableWhenFacedWithInvalidConfiguration() {
327+
void shouldBeStoppableWhenFacedWithBrokenContextConfiguration() {
326328
final ObjectFactory factory = new SpringFactory();
327-
factory.addClass(WithEmptySpringAnnotations.class);
328-
329-
IllegalStateException exception = assertThrows(IllegalStateException.class, factory::start);
330-
assertThat(exception.getMessage(),
331-
containsString("DelegatingSmartContextLoader was unable to detect defaults"));
332-
assertDoesNotThrow(factory::stop);
333-
}
334-
335-
@Test
336-
void shouldBeStoppableWhenFacedWithMissingContextConfiguration() {
337-
final ObjectFactory factory = new SpringFactory();
338-
factory.addClass(WithoutContextConfiguration.class);
329+
factory.addClass(WithBrokenContextConfiguration.class);
339330

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

394385
@CucumberContextConfiguration
395-
@ContextConfiguration
396-
public static class WithEmptySpringAnnotations {
386+
public static class WithBrokenContextConfiguration {
397387

398-
}
388+
@Configuration
389+
public static class BrokenConfiguration {
399390

400-
@CucumberContextConfiguration
401-
public static class WithoutContextConfiguration {
391+
@Bean
392+
public Object brokenBean() {
393+
throw new RuntimeException("Oops!");
394+
}
395+
396+
}
402397

403398
}
404399

0 commit comments

Comments
 (0)