Skip to content

Commit 97185ec

Browse files
authored
Merge 89facff into 27d7cf8
2 parents 27d7cf8 + 89facff commit 97185ec

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ retrofit = "2.9.0"
3131
slf4j = "1.7.30"
3232
springboot2 = "2.7.18"
3333
springboot3 = "3.5.0"
34-
springboot4 = "4.0.0-M3"
34+
springboot4 = "4.0.0-RC1"
3535
# Android
3636
targetSdk = "34"
3737
compileSdk = "34"
@@ -165,6 +165,7 @@ springboot3-starter-security = { module = "org.springframework.boot:spring-boot-
165165
springboot3-starter-jdbc = { module = "org.springframework.boot:spring-boot-starter-jdbc", version.ref = "springboot3" }
166166
springboot3-starter-actuator = { module = "org.springframework.boot:spring-boot-starter-actuator", version.ref = "springboot3" }
167167
springboot4-otel = { module = "io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter", version.ref = "otelInstrumentation" }
168+
springboot4-resttestclient = { module = "org.springframework.boot:spring-boot-resttestclient", version.ref = "springboot4" }
168169
springboot4-starter = { module = "org.springframework.boot:spring-boot-starter", version.ref = "springboot4" }
169170
springboot4-starter-graphql = { module = "org.springframework.boot:spring-boot-starter-graphql", version.ref = "springboot4" }
170171
springboot4-starter-quartz = { module = "org.springframework.boot:spring-boot-starter-quartz", version.ref = "springboot4" }

sentry-spring-7/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ dependencies {
7575
testImplementation(libs.springboot4.starter.webflux)
7676
testImplementation(libs.springboot4.starter.restclient)
7777
testImplementation(libs.springboot4.starter.webclient)
78+
testImplementation(libs.springboot4.resttestclient)
7879
testImplementation(projects.sentryReactor)
7980
}
8081

sentry-spring-7/src/test/kotlin/io/sentry/spring7/graphql/SentrySpringSubscriptionHandlerTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class SentrySpringSubscriptionHandlerTest {
4040
whenever(parameters.environment).thenReturn(dataFetchingEnvironment)
4141
val resultObject =
4242
SentrySpringSubscriptionHandler()
43-
.onSubscriptionResult(Flux.error<Any?>(exception), scopes, exceptionReporter, parameters)
44-
assertThrows<IllegalStateException> { (resultObject as Flux<Any?>).blockFirst() }
43+
.onSubscriptionResult(Flux.error<Any>(exception), scopes, exceptionReporter, parameters)
44+
assertThrows<IllegalStateException> { (resultObject as Flux<Any>).blockFirst() }
4545

4646
verify(exceptionReporter)
4747
.captureThrowable(
@@ -77,12 +77,12 @@ class SentrySpringSubscriptionHandlerTest {
7777
val resultObject =
7878
SentrySpringSubscriptionHandler()
7979
.onSubscriptionResult(
80-
Flux.error<Any?>(wrappedException),
80+
Flux.error<Any>(wrappedException),
8181
scopes,
8282
exceptionReporter,
8383
parameters,
8484
)
85-
assertThrows<SubscriptionPublisherException> { (resultObject as Flux<Any?>).blockFirst() }
85+
assertThrows<SubscriptionPublisherException> { (resultObject as Flux<Any>).blockFirst() }
8686

8787
verify(exceptionReporter)
8888
.captureThrowable(

sentry-spring-7/src/test/kotlin/io/sentry/spring7/mvc/SentrySpringIntegrationTest.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ import org.mockito.kotlin.verify
4242
import org.mockito.kotlin.whenever
4343
import org.springframework.beans.factory.annotation.Autowired
4444
import org.springframework.boot.autoconfigure.SpringBootApplication
45+
import org.springframework.boot.resttestclient.TestRestTemplate
4546
import org.springframework.boot.test.context.SpringBootTest
46-
import org.springframework.boot.web.server.test.LocalServerPort
47-
import org.springframework.boot.web.server.test.client.TestRestTemplate
47+
import org.springframework.boot.test.web.server.LocalServerPort
4848
import org.springframework.boot.web.servlet.FilterRegistrationBean
4949
import org.springframework.context.annotation.Bean
5050
import org.springframework.context.annotation.Configuration
@@ -80,13 +80,15 @@ import org.springframework.web.reactive.function.client.WebClient
8080
class SentrySpringIntegrationTest {
8181

8282
companion object {
83+
@JvmStatic
8384
@BeforeClass
84-
fun `configure awaitlity`() {
85+
fun `configure awaitlity`(): Unit {
8586
Awaitility.setDefaultTimeout(500, TimeUnit.MILLISECONDS)
8687
}
8788

89+
@JvmStatic
8890
@AfterClass
89-
fun `reset awaitility`() {
91+
fun `reset awaitility`(): Unit {
9092
Awaitility.reset()
9193
}
9294
}

sentry-spring-7/src/test/kotlin/io/sentry/spring7/webflux/SentryWebfluxIntegrationTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ import org.mockito.kotlin.whenever
2727
import org.springframework.beans.factory.annotation.Autowired
2828
import org.springframework.boot.ApplicationRunner
2929
import org.springframework.boot.autoconfigure.SpringBootApplication
30-
import org.springframework.boot.security.autoconfigure.reactive.ReactiveSecurityAutoConfiguration
31-
import org.springframework.boot.security.autoconfigure.servlet.SecurityAutoConfiguration
30+
import org.springframework.boot.security.autoconfigure.SecurityAutoConfiguration
31+
import org.springframework.boot.security.autoconfigure.web.reactive.ReactiveWebSecurityAutoConfiguration
3232
import org.springframework.boot.test.context.SpringBootTest
33-
import org.springframework.boot.web.server.test.LocalServerPort
33+
import org.springframework.boot.test.web.server.LocalServerPort
3434
import org.springframework.context.annotation.Bean
3535
import org.springframework.http.ResponseEntity
3636
import org.springframework.test.context.junit4.SpringRunner
@@ -136,7 +136,7 @@ class SentryWebfluxIntegrationTest {
136136
}
137137

138138
@SpringBootApplication(
139-
exclude = [ReactiveSecurityAutoConfiguration::class, SecurityAutoConfiguration::class]
139+
exclude = [ReactiveWebSecurityAutoConfiguration::class, SecurityAutoConfiguration::class]
140140
)
141141
open class App {
142142
private val transport = mock<ITransport>().also { whenever(it.isHealthy).thenReturn(true) }

sentry-spring-boot-4/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ dependencies {
102102
testImplementation(libs.springboot4.starter.webflux)
103103
testImplementation(libs.springboot4.starter.restclient)
104104
testImplementation(libs.springboot4.starter.webclient)
105+
testImplementation(libs.springboot4.resttestclient)
105106
}
106107

107108
configure<SourceSetContainer> { test { java.srcDir("src/test/java") } }

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import org.mockito.kotlin.whenever
2424
import org.slf4j.LoggerFactory
2525
import org.springframework.beans.factory.annotation.Autowired
2626
import org.springframework.boot.autoconfigure.SpringBootApplication
27+
import org.springframework.boot.resttestclient.TestRestTemplate
2728
import org.springframework.boot.test.context.SpringBootTest
28-
import org.springframework.boot.web.server.test.LocalServerPort
29-
import org.springframework.boot.web.server.test.client.TestRestTemplate
29+
import org.springframework.boot.test.web.server.LocalServerPort
3030
import org.springframework.context.annotation.Bean
3131
import org.springframework.context.annotation.Configuration
3232
import org.springframework.http.HttpEntity

0 commit comments

Comments
 (0)