Skip to content

Commit 723becd

Browse files
adinauerclaude
andcommitted
fix(test): Use baseContextRunner for transport factory tests
Tests asserting AsyncHttpTransportFactory must not use contextRunner which includes NoOpTransportConfiguration, as the NoOp bean would override the auto-configured transport factory. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 294b1ed commit 723becd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sentry-spring-boot-4/src/test/kotlin/io/sentry/spring/boot4/SentryAutoConfigurationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ class SentryAutoConfigurationTest {
768768

769769
@Test
770770
fun `when sentry-apache-http-client-5 is not on the classpath, does not create apache transport factory`() {
771-
contextRunner
771+
baseContextRunner
772772
.withPropertyValues("sentry.dsn=http://key@localhost/proj")
773773
.withClassLoader(FilteredClassLoader(ApacheHttpClientTransportFactory::class.java))
774774
.run {

sentry-spring-boot-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentryAutoConfigurationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ class SentryAutoConfigurationTest {
790790

791791
@Test
792792
fun `when sentry-apache-http-client-5 is not on the classpath, does not create apache transport factory`() {
793-
contextRunner
793+
baseContextRunner
794794
.withPropertyValues("sentry.dsn=http://key@localhost/proj")
795795
.withClassLoader(FilteredClassLoader(ApacheHttpClientTransportFactory::class.java))
796796
.run {

sentry-spring-boot/src/test/kotlin/io/sentry/spring/boot/SentryAutoConfigurationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ class SentryAutoConfigurationTest {
779779

780780
@Test
781781
fun `when sentry-apache-http-client-5 is not on the classpath, does not create apache transport factory`() {
782-
contextRunner
782+
baseContextRunner
783783
.withPropertyValues("sentry.dsn=http://key@localhost/proj")
784784
.withClassLoader(FilteredClassLoader(ApacheHttpClientTransportFactory::class.java))
785785
.run {

0 commit comments

Comments
 (0)