File tree Expand file tree Collapse file tree 5 files changed +17
-7
lines changed
grpc-spring-boot-starter-demo/src/test
java/org/lognet/springboot/grpc Expand file tree Collapse file tree 5 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ subprojects {
4747 targetCompatibility = 1.8
4848
4949 test {
50- forkEvery = 1
50+ // forkEvery = 1
5151 testLogging {
5252 exceptionFormat = ' full'
5353 }
@@ -68,10 +68,6 @@ task codeCoverageReport(type: JacocoReport) {
6868 sourceSets (project(' grpc-spring-boot-starter' ). sourceSets. main
6969 ,project(' grpc-client-spring-boot-starter' ). sourceSets. main)
7070
71- // subprojects.each {
72- // sourceSets it.sourceSets.main
73- // }
74-
7571 reports {
7672 xml. enabled true
7773 xml. destination = new File (buildDir," reports/jacoco/report.xml" )
Original file line number Diff line number Diff line change 88import org .lognet .springboot .grpc .context .LocalRunningGrpcPort ;
99import org .lognet .springboot .grpc .demo .DemoApp ;
1010import org .springframework .boot .test .context .SpringBootTest ;
11+ import org .springframework .test .annotation .DirtiesContext ;
1112import org .springframework .test .context .ActiveProfiles ;
1213import org .springframework .test .context .junit4 .SpringRunner ;
1314
1617
1718@ RunWith (SpringRunner .class )
1819@ SpringBootTest (classes = {DemoApp .class }, webEnvironment = NONE )
19- @ ActiveProfiles ("disable-security" )
20+ @ ActiveProfiles ({"disable-security" ,"default-port" })
21+ @ DirtiesContext
2022public class DefaultGrpcPortTest extends GrpcServerTestBase {
2123 @ LocalRunningGrpcPort
2224 int runningPort ;
Original file line number Diff line number Diff line change 99import org .lognet .springboot .grpc .context .LocalRunningGrpcPort ;
1010import org .lognet .springboot .grpc .demo .DemoApp ;
1111import org .springframework .boot .test .context .SpringBootTest ;
12+ import org .springframework .test .annotation .DirtiesContext ;
1213import org .springframework .test .context .ActiveProfiles ;
1314import org .springframework .test .context .junit4 .SpringRunner ;
1415import org .springframework .util .SocketUtils ;
1718
1819@ RunWith (SpringRunner .class )
1920@ SpringBootTest (classes = {DemoApp .class }, webEnvironment = NONE )
20- @ ActiveProfiles ("disable-security" )
21+ @ ActiveProfiles ({"disable-security" ,"default-port" })
22+ @ DirtiesContext
2123public class EnvVarGrpcPortTest extends GrpcServerTestBase {
2224
2325
Original file line number Diff line number Diff line change 66import org .lognet .springboot .grpc .autoconfigure .GRpcServerProperties ;
77import org .lognet .springboot .grpc .demo .DemoApp ;
88import org .springframework .boot .test .context .SpringBootTest ;
9+ import org .springframework .test .annotation .DirtiesContext ;
910import org .springframework .test .context .ActiveProfiles ;
1011import org .springframework .test .context .junit4 .SpringRunner ;
1112
1415@ RunWith (SpringRunner .class )
1516@ SpringBootTest (classes = {DemoApp .class }, webEnvironment = NONE )
1617@ ActiveProfiles ("netty-test2" )
18+ @ DirtiesContext
1719public class NettyTransportConfigTest2 extends GrpcServerTestBase {
1820
1921 @ Override
Original file line number Diff line number Diff line change @@ -12,3 +12,11 @@ management:
1212logging :
1313 level :
1414 root : INFO
15+
16+ ---
17+ spring :
18+ config :
19+ activate :
20+ on-profile : " !default-port"
21+ grpc :
22+ port : 0
You can’t perform that action at this time.
0 commit comments