Skip to content

Commit

Permalink
update: modify unittest port
Browse files Browse the repository at this point in the history
  • Loading branch information
fengye404 committed Nov 24, 2024
1 parent 133a148 commit ec80656
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class GrpcTest {
private static final String HOST = "localhost";
private static final int PORT = 9091;
private static final int PORT = 9092;
private static final String HOST_PORT = HOST + ":" + PORT;
private static final String UNIT_TEST_GRPC_SERVICE_PACKAGE_NAME = "unittest.grpc.service.impl";
private static final Logger log = (Logger) LoggerFactory.getLogger(GrpcTest.class);
Expand Down Expand Up @@ -101,7 +101,7 @@ public void testUnarySum() throws InterruptedException {
@Test
public void testClientStreamSum() throws Throwable {
log.info("testClientStreamSum start!");
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9091)
ManagedChannel channel = ManagedChannelBuilder.forTarget(HOST_PORT)
.usePlaintext()
.build();

Expand Down Expand Up @@ -144,7 +144,7 @@ public void onCompleted() {
@Test
public void testDataIsolation() throws InterruptedException {
log.info("testDataIsolation start!");
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9091)
ManagedChannel channel = ManagedChannelBuilder.forTarget(HOST_PORT)
.usePlaintext()
.build();

Expand Down Expand Up @@ -199,7 +199,7 @@ public void onCompleted() {
@Test
public void testServerStream() throws InterruptedException {
log.info("testServerStream start!");
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9091)
ManagedChannel channel = ManagedChannelBuilder.forTarget(HOST_PORT)
.usePlaintext()
.build();

Expand Down Expand Up @@ -237,7 +237,7 @@ public void onCompleted() {
@Test
public void testBiStream() throws Throwable {
log.info("testBiStream start!");
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9091)
ManagedChannel channel = ManagedChannelBuilder.forTarget(HOST_PORT)
.usePlaintext()
.build();

Expand Down

0 comments on commit ec80656

Please sign in to comment.