Skip to content

Commit 1d5647b

Browse files
committed
Merge pull request #17106 from ielatif
* pr/17106: Fix deployment tests JUnit 5 checkstyle issues Closes gh-17106
2 parents c11f25b + 35dc798 commit 1d5647b

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

spring-boot-tests/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish/src/test/java/sample/SampleGlassfishDeployApplicationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SampleGlassfishDeployApplicationIT {
3232
private int port = Integer.valueOf(System.getProperty("port"));
3333

3434
@Test
35-
public void testHome() throws Exception {
35+
void testHome() throws Exception {
3636
String url = "http://localhost:" + this.port + "/bootapp/";
3737
System.out.println(url);
3838
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);
@@ -41,7 +41,7 @@ public void testHome() throws Exception {
4141
}
4242

4343
@Test
44-
public void testHealth() throws Exception {
44+
void testHealth() throws Exception {
4545
String url = "http://localhost:" + this.port + "/bootapp/actuator/health";
4646
System.out.println(url);
4747
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);

spring-boot-tests/spring-boot-deployment-tests/spring-boot-deployment-test-tomcat/src/test/java/sample/SampleTomcatDeployApplicationIT.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public class SampleTomcatDeployApplicationIT {
3838
private int port = Integer.valueOf(System.getProperty("port"));
3939

4040
@Test
41-
public void testHome() throws Exception {
41+
void testHome() throws Exception {
4242
String url = "http://localhost:" + this.port + "/bootapp/";
4343
ResponseEntity<String> entity = this.rest.getForEntity(url, String.class);
4444
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
4545
assertThat(entity.getBody()).isEqualTo("Hello World");
4646
}
4747

4848
@Test
49-
public void testHealth() throws Exception {
49+
void testHealth() throws Exception {
5050
String url = "http://localhost:" + this.port + "/bootapp/actuator/health";
5151
System.out.println(url);
5252
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);
@@ -55,34 +55,34 @@ public void testHealth() throws Exception {
5555
}
5656

5757
@Test
58-
public void errorFromExceptionForRequestAcceptingAnythingProducesAJsonResponse() throws Exception {
58+
void errorFromExceptionForRequestAcceptingAnythingProducesAJsonResponse() throws Exception {
5959
assertThatPathProducesExpectedResponse("/bootapp/exception", MediaType.ALL, MediaType.APPLICATION_JSON);
6060
}
6161

6262
@Test
63-
public void errorFromExceptionForRequestAcceptingJsonProducesAJsonResponse() throws Exception {
63+
void errorFromExceptionForRequestAcceptingJsonProducesAJsonResponse() throws Exception {
6464
assertThatPathProducesExpectedResponse("/bootapp/exception", MediaType.APPLICATION_JSON,
6565
MediaType.APPLICATION_JSON);
6666
}
6767

6868
@Test
69-
public void errorFromExceptionForRequestAcceptingHtmlProducesAnHtmlResponse() throws Exception {
69+
void errorFromExceptionForRequestAcceptingHtmlProducesAnHtmlResponse() throws Exception {
7070
assertThatPathProducesExpectedResponse("/bootapp/exception", MediaType.TEXT_HTML, MediaType.TEXT_HTML);
7171
}
7272

7373
@Test
74-
public void sendErrorForRequestAcceptingAnythingProducesAJsonResponse() throws Exception {
74+
void sendErrorForRequestAcceptingAnythingProducesAJsonResponse() throws Exception {
7575
assertThatPathProducesExpectedResponse("/bootapp/send-error", MediaType.ALL, MediaType.APPLICATION_JSON);
7676
}
7777

7878
@Test
79-
public void sendErrorForRequestAcceptingJsonProducesAJsonResponse() throws Exception {
79+
void sendErrorForRequestAcceptingJsonProducesAJsonResponse() throws Exception {
8080
assertThatPathProducesExpectedResponse("/bootapp/send-error", MediaType.APPLICATION_JSON,
8181
MediaType.APPLICATION_JSON);
8282
}
8383

8484
@Test
85-
public void sendErrorForRequestAcceptingHtmlProducesAnHtmlResponse() throws Exception {
85+
void sendErrorForRequestAcceptingHtmlProducesAnHtmlResponse() throws Exception {
8686
assertThatPathProducesExpectedResponse("/bootapp/send-error", MediaType.TEXT_HTML, MediaType.TEXT_HTML);
8787
}
8888

spring-boot-tests/spring-boot-deployment-tests/spring-boot-deployment-test-tomee/src/test/java/sample/SampleTomEEDeployApplicationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class SampleTomEEDeployApplicationIT {
3232
private int port = Integer.valueOf(System.getProperty("port"));
3333

3434
@Test
35-
public void testHome() throws Exception {
35+
void testHome() throws Exception {
3636
String url = "http://localhost:" + this.port + "/bootapp/";
3737
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);
3838
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
3939
assertThat(entity.getBody()).isEqualTo("Hello World");
4040
}
4141

4242
@Test
43-
public void testHealth() throws Exception {
43+
void testHealth() throws Exception {
4444
String url = "http://localhost:" + this.port + "/bootapp/actuator/health";
4545
System.out.println(url);
4646
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);

spring-boot-tests/spring-boot-deployment-tests/spring-boot-deployment-test-wildfly/src/test/java/sample/SampleWildFlyDeployApplicationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class SampleWildFlyDeployApplicationIT {
3232
private int port = Integer.valueOf(System.getProperty("port"));
3333

3434
@Test
35-
public void testHome() throws Exception {
35+
void testHome() throws Exception {
3636
String url = "http://localhost:" + this.port + "/bootapp/";
3737
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);
3838
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
3939
assertThat(entity.getBody()).isEqualTo("Hello World");
4040
}
4141

4242
@Test
43-
public void testHealth() throws Exception {
43+
void testHealth() throws Exception {
4444
String url = "http://localhost:" + this.port + "/bootapp/actuator/health";
4545
System.out.println(url);
4646
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);

spring-boot-tests/spring-boot-deployment-tests/spring-boot-deployment-test-wlp/src/test/java/sample/SampleWlpDeployApplicationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class SampleWlpDeployApplicationIT {
3232
private int port = Integer.valueOf(System.getProperty("port"));
3333

3434
@Test
35-
public void testHome() throws Exception {
35+
void testHome() throws Exception {
3636
String url = "http://localhost:" + this.port + "/bootapp/";
3737
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);
3838
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
3939
assertThat(entity.getBody()).isEqualTo("Hello World");
4040
}
4141

4242
@Test
43-
public void testHealth() throws Exception {
43+
void testHealth() throws Exception {
4444
String url = "http://localhost:" + this.port + "/bootapp/actuator/health";
4545
System.out.println(url);
4646
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(url, String.class);

0 commit comments

Comments
 (0)