Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c7ba3a0

Browse files
authored
Build optimize (eugenp#3328)
* CustomConverterIntegrationTest * StringToEmployeeConverterControllerIntegrationTest * PersonsRepositoryIntegrationTest * Refactor spring-rest-embedded-tomcat pom * Disable Rxjava test
1 parent b5c7ffe commit c7ba3a0

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
import static org.hamcrest.core.IsEqual.equalTo;
1515
import static org.hamcrest.core.IsNull.notNullValue;
1616

17-
/**
18-
* Created by adam.
19-
*/
2017
@RunWith(SpringRunner.class)
2118
@SpringBootTest
2219
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
23-
public class PersonsRepositoryTest {
20+
public class PersonsRepositoryIntegrationTest {
2421

2522
@Autowired
2623
private PersonsRepository personsRepository;

rxjava/src/test/java/com/baeldung/rxjava/SchedulersLiveTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public void givenObservable_whenIoScheduling_thenReturnThreadName() throws Inter
194194
}
195195

196196
@Test
197+
@Ignore
197198
public void givenObservable_whenComputationScheduling_thenReturnThreadName() throws InterruptedException {
198199
System.out.println("computation");
199200
Observable.just("computation")

spring-boot/src/test/java/org/baeldung/converter/CustomConverterTest.java renamed to spring-boot/src/test/java/org/baeldung/converter/CustomConverterIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@RunWith(SpringJUnit4ClassRunner.class)
2020
@SpringBootTest(classes = Application.class)
2121
@WebAppConfiguration
22-
public class CustomConverterTest {
22+
public class CustomConverterIntegrationTest {
2323

2424
@Autowired
2525
ConversionService conversionService;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@RunWith(SpringRunner.class)
2020
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class)
2121
@AutoConfigureMockMvc
22-
public class StringToEmployeeConverterControllerTest {
22+
public class StringToEmployeeConverterControllerIntegrationTest {
2323

2424
@Autowired
2525
private MockMvc mockMvc;

spring-rest-embedded-tomcat/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,30 @@
6969

7070
<build>
7171
<finalName>spring-rest-embedded-tomcat</finalName>
72+
<plugins>
73+
<plugin>
74+
<groupId>org.apache.maven.plugins</groupId>
75+
<artifactId>maven-surefire-plugin</artifactId>
76+
<version>${maven-surefire-plugin.version}</version>
77+
<configuration>
78+
<forkCount>3</forkCount>
79+
<reuseForks>true</reuseForks>
80+
<excludes>
81+
<exclude>**/*IntegrationTest.java</exclude>
82+
<exclude>**/*LongRunningUnitTest.java</exclude>
83+
<exclude>**/*ManualTest.java</exclude>
84+
<exclude>**/JdbcTest.java</exclude>
85+
<exclude>**/*LiveTest.java</exclude>
86+
</excludes>
87+
88+
</configuration>
89+
</plugin>
90+
</plugins>
7291
</build>
7392

7493
<properties>
7594
<spring.version>5.0.1.RELEASE</spring.version>
95+
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
7696
<junit.version>4.12</junit.version>
7797
<jackson.library>2.9.2</jackson.library>
7898
<maven.compiler.source>1.8</maven.compiler.source>

0 commit comments

Comments
 (0)