File tree Expand file tree Collapse file tree 3 files changed +9
-16
lines changed
grpc-client/src/test/java/org/springframework/integration/samples/grpc/client
grpc-server/src/test/java/org/springframework/integration/samples/grpc/server Expand file tree Collapse file tree 3 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 2121import org .junit .jupiter .api .Test ;
2222import org .junit .jupiter .api .extension .ExtendWith ;
2323
24+ import org .springframework .boot .grpc .test .autoconfigure .AutoConfigureTestGrpcTransport ;
2425import org .springframework .boot .test .context .SpringBootTest ;
2526import org .springframework .boot .test .context .TestConfiguration ;
2627import org .springframework .boot .test .system .CapturedOutput ;
3637 *
3738 * @author Glenn Renfro
3839 */
39- @ SpringBootTest (properties = {
40- "spring.grpc.server.inprocess.name=test" ,
41- "spring.grpc.client.channels.spring-integration.address=in-process:test"
42- })
40+ @ SpringBootTest
4341@ DirtiesContext
4442@ ExtendWith (OutputCaptureExtension .class )
43+ @ AutoConfigureTestGrpcTransport
4544public class GrpcClientTests {
4645
4746 /**
Original file line number Diff line number Diff line change 2828import org .junit .jupiter .api .Test ;
2929
3030import org .springframework .beans .factory .annotation .Autowired ;
31+ import org .springframework .boot .grpc .test .autoconfigure .AutoConfigureTestGrpcTransport ;
3132import org .springframework .boot .test .context .SpringBootTest ;
3233import org .springframework .grpc .client .ImportGrpcClients ;
3334
3839 *
3940 * @author Glenn Renfro
4041 */
41- @ SpringBootTest ({
42- "spring.grpc.server.inprocess.name=test"
43- })
42+ @ SpringBootTest
4443@ ImportGrpcClients (
4544 types = {
4645 SimpleGrpc .SimpleBlockingStub .class ,
4746 SimpleGrpc .SimpleStub .class
48- },
49- target = "in-process:test"
50- )
47+ })
48+ @ AutoConfigureTestGrpcTransport
5149class GrpcServerTests {
5250
5351 private static final Log LOGGER = LogFactory .getLog (GrpcServerTests .class );
Original file line number Diff line number Diff line change @@ -891,9 +891,7 @@ project('grpc-client') {
891891 implementation ' org.springframework.integration:spring-integration-grpc'
892892
893893 // Test
894- testImplementation (' org.springframework.boot:spring-boot-starter-grpc-test' ) {
895- exclude group : ' io.grpc' , module : ' grpc-netty' // TODO Review this exclusion prior to 7.1.0 release
896- }
894+ testImplementation (' org.springframework.boot:spring-boot-starter-grpc-test' )
897895 }
898896
899897
@@ -946,9 +944,7 @@ project('grpc-server') {
946944 implementation ' org.springframework.integration:spring-integration-grpc'
947945
948946 // Test
949- testImplementation (' org.springframework.boot:spring-boot-starter-grpc-test' ) {
950- exclude group : ' io.grpc' , module : ' grpc-netty' // TODO Review this exclusion prior to 7.1.0 release
951- }
947+ testImplementation (' org.springframework.boot:spring-boot-starter-grpc-test' )
952948 }
953949
954950 protobuf {
You can’t perform that action at this time.
0 commit comments