Skip to content

Commit

Permalink
android-interop-testing: Remove usage of Netty for grpc server
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejona86 committed Aug 8, 2023
1 parent 40bff67 commit c9864a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions android-interop-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ dependencies {

compileOnly libraries.javax.annotation

androidTestImplementation project(':grpc-netty'),
'androidx.test.ext:junit:1.1.3',
androidTestImplementation 'androidx.test.ext:junit:1.1.3',
'androidx.test:runner:1.4.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
import androidx.test.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
import io.grpc.Grpc;
import io.grpc.InsecureServerCredentials;
import io.grpc.Server;
import io.grpc.android.UdsChannelBuilder;
import io.grpc.netty.NettyServerBuilder;
import io.grpc.testing.integration.TestServiceImpl;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -68,7 +69,7 @@ public void setUp() throws IOException {

// Start local server.
server =
NettyServerBuilder.forPort(0)
Grpc.newServerBuilderForPort(0, InsecureServerCredentials.create())
.maxInboundMessageSize(16 * 1024 * 1024)
.addService(new TestServiceImpl(serverExecutor))
.build();
Expand Down

0 comments on commit c9864a1

Please sign in to comment.