Skip to content

Commit c9864a1

Browse files
committed
android-interop-testing: Remove usage of Netty for grpc server
We have the OkHttp server these days, so we don't need to use Netty. Use the generic API instead of hard-coding OkHttp. We've seen some recent interop failures. We aren't entirely sure what is going on, but we have seen some Netty usages in logcat. Since we don't even want Netty on Android, just get rid of it and even if it doesn't help with the failures things are better dependency-wise.
1 parent 40bff67 commit c9864a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

android-interop-testing/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ dependencies {
8888

8989
compileOnly libraries.javax.annotation
9090

91-
androidTestImplementation project(':grpc-netty'),
92-
'androidx.test.ext:junit:1.1.3',
91+
androidTestImplementation 'androidx.test.ext:junit:1.1.3',
9392
'androidx.test:runner:1.4.0'
9493
}
9594

android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/UdsChannelInteropTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
import androidx.test.InstrumentationRegistry;
2323
import androidx.test.ext.junit.runners.AndroidJUnit4;
2424
import androidx.test.rule.ActivityTestRule;
25+
import io.grpc.Grpc;
26+
import io.grpc.InsecureServerCredentials;
2527
import io.grpc.Server;
2628
import io.grpc.android.UdsChannelBuilder;
27-
import io.grpc.netty.NettyServerBuilder;
2829
import io.grpc.testing.integration.TestServiceImpl;
2930
import java.io.IOException;
3031
import java.util.concurrent.ExecutionException;
@@ -68,7 +69,7 @@ public void setUp() throws IOException {
6869

6970
// Start local server.
7071
server =
71-
NettyServerBuilder.forPort(0)
72+
Grpc.newServerBuilderForPort(0, InsecureServerCredentials.create())
7273
.maxInboundMessageSize(16 * 1024 * 1024)
7374
.addService(new TestServiceImpl(serverExecutor))
7475
.build();

0 commit comments

Comments
 (0)