Browse Source

Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-websocket-jetty

See gh-47263
pull/47665/head
Moritz Halbritter 2 months ago
parent
commit
34ca46740d
  1. 4
      smoke-test/spring-boot-smoke-test-websocket-jetty/build.gradle
  2. 1
      smoke-test/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/SampleWebSocketsApplicationTests.java
  3. 1
      smoke-test/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java

4
smoke-test/spring-boot-smoke-test-websocket-jetty/build.gradle

@ -28,3 +28,7 @@ dependencies {
testImplementation(project(":starter:spring-boot-starter-test")) testImplementation(project(":starter:spring-boot-starter-test"))
} }
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}

1
smoke-test/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/SampleWebSocketsApplicationTests.java

@ -80,6 +80,7 @@ class SampleWebSocketsApplicationTests {
static class ClientConfiguration implements CommandLineRunner { static class ClientConfiguration implements CommandLineRunner {
@Value("${websocket.uri}") @Value("${websocket.uri}")
@SuppressWarnings("NullAway.Init")
private String webSocketUri; private String webSocketUri;
private final CountDownLatch latch = new CountDownLatch(1); private final CountDownLatch latch = new CountDownLatch(1);

1
smoke-test/spring-boot-smoke-test-websocket-jetty/src/test/java/smoketest/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java

@ -95,6 +95,7 @@ class CustomContainerWebSocketsApplicationTests {
static class ClientConfiguration implements CommandLineRunner { static class ClientConfiguration implements CommandLineRunner {
@Value("${websocket.uri}") @Value("${websocket.uri}")
@SuppressWarnings("NullAway.Init")
private String webSocketUri; private String webSocketUri;
private final CountDownLatch latch = new CountDownLatch(1); private final CountDownLatch latch = new CountDownLatch(1);

Loading…
Cancel
Save