Skip to content

Commit 7a4b0af

Browse files
[Android] gRPC client tests (#73060)
* WIP: add gRPC tests * Fix AOT and trimming * WIP * Implement IncludeNetworkSecurityConfig * Use IncludeNetworkSecurityConfig * Fix gRPC test * Avoid git checkout * Remove unnecessary code * WIP: start working on CI configuration * Remove WinHttpHandler * Fix problem with SSL * Change server host * Setup CI (#1) * Get Docker container building & exported via test build * Changes * Add missing pfx certificate * changes * cleanup Co-authored-by: Simon Rozsival <[email protected]> * Use tls * Update yml * Revert changes to the mono Android sample app * Bump android image version * Bump image version * Enable TLS * Remove hardcoded package versions * Update package versions * Update package versions * Rename pipeline * Move interop tests website dependencies versions to Versions.props * Add cred scan supression for the interop test server private key * Fix licenses * Remove dependencies * Fix path to Versions.props * Remove unnecessary dependency version * Fix building docker image * Change pfx password Co-authored-by: Jo Shields <[email protected]>
1 parent 79e3cd0 commit 7a4b0af

36 files changed

+2185
-14
lines changed

.config/CredScanSuppressions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyPemTests.cs",
88
"src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyPemTests.cs",
99
"src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyPemTests.cs",
10-
"src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs"
10+
"src/libraries/System.Security.Cryptography/tests/X509Certificates/TestData.cs",
11+
"src/tests/FunctionalTests/Android/Device_Emulator/gRPC/grpc-dotnet/testassets/Certs/InteropTests/server1.key"
1112
],
1213
"placeholder": [
1314
"-----BEGIN PRIVATE KEY-----",

eng/Versions.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@
165165
<SQLitePCLRawbundle_greenVersion>2.0.4</SQLitePCLRawbundle_greenVersion>
166166
<MoqVersion>4.12.0</MoqVersion>
167167
<FsCheckVersion>2.14.3</FsCheckVersion>
168+
<!-- Android gRPC client tests -->
169+
<GoogleProtobufVersion>3.19.4</GoogleProtobufVersion>
170+
<GrpcAspNetCoreVersion>2.46.0</GrpcAspNetCoreVersion>
171+
<GrpcAspNetCoreWebVersion>2.46.0</GrpcAspNetCoreWebVersion>
172+
<GrpcAuthVersion>2.46.3</GrpcAuthVersion>
173+
<GrpcCoreVersion>2.46.3</GrpcCoreVersion>
174+
<GrpcDotnetClientVersion>2.45.0</GrpcDotnetClientVersion>
175+
<GrpcToolsVersion>2.45.0</GrpcToolsVersion>
168176
<!-- Uncomment to set a fixed version, else the latest is used -->
169177
<!--<SdkVersionForWorkloadTesting>7.0.100-rc.1.22402.35</SdkVersionForWorkloadTesting>-->
170178
<CompilerPlatformTestingVersion>1.1.2-beta1.22403.2</CompilerPlatformTestingVersion>

eng/liveBuilds.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<CoreCLRBuildIntegrationDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build'))</CoreCLRBuildIntegrationDir>
3131

3232
<MonoAotCrossDir>$([MSBuild]::NormalizeDirectory('$(MonoArtifactsPath)', 'cross', $(TargetOS.ToLowerInvariant())-$(TargetArchitecture.ToLowerInvariant())))</MonoAotCrossDir>
33+
<GrpcServerDockerImageDir>$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'obj', 'grpcserver', 'docker'))</GrpcServerDockerImageDir>
3334

3435
<LibrariesPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'packages', '$(LibrariesConfiguration)'))</LibrariesPackagesDir>
3536
<LibrariesShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesPackagesDir)', 'Shipping'))</LibrariesShippingPackagesDir>

eng/pipelines/common/platform-matrix.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ jobs:
207207
platform: Linux_bionic_arm64
208208
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
209209
container:
210-
image: ubuntu-18.04-android-20220628174908-5789942
210+
image: ubuntu-18.04-android-20220808192756-8fcaabc
211211
registry: mcr
212212
jobParameters:
213213
runtimeFlavor: mono
@@ -236,7 +236,7 @@ jobs:
236236
platform: Linux_bionic_x64
237237
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
238238
container:
239-
image: ubuntu-18.04-android-20220628174908-5789942
239+
image: ubuntu-18.04-android-20220808192756-8fcaabc
240240
registry: mcr
241241
jobParameters:
242242
runtimeFlavor: mono
@@ -494,7 +494,7 @@ jobs:
494494
platform: Android_x64
495495
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
496496
container:
497-
image: ubuntu-18.04-android-20220628174908-5789942
497+
image: ubuntu-18.04-android-20220808192756-8fcaabc
498498
registry: mcr
499499
jobParameters:
500500
runtimeFlavor: mono
@@ -519,7 +519,7 @@ jobs:
519519
platform: Android_x86
520520
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
521521
container:
522-
image: ubuntu-18.04-android-20220628174908-5789942
522+
image: ubuntu-18.04-android-20220808192756-8fcaabc
523523
registry: mcr
524524
jobParameters:
525525
runtimeFlavor: mono
@@ -544,7 +544,7 @@ jobs:
544544
platform: Android_arm
545545
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
546546
container:
547-
image: ubuntu-18.04-android-20220628174908-5789942
547+
image: ubuntu-18.04-android-20220808192756-8fcaabc
548548
registry: mcr
549549
jobParameters:
550550
runtimeFlavor: mono
@@ -569,7 +569,7 @@ jobs:
569569
platform: Android_arm64
570570
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
571571
container:
572-
image: ubuntu-18.04-android-20220628174908-5789942
572+
image: ubuntu-18.04-android-20220808192756-8fcaabc
573573
registry: mcr
574574
jobParameters:
575575
runtimeFlavor: mono
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# We run this pipeline on a schedule and also developers can run it
2+
# via /azp run command on PRs.
3+
#
4+
# Setting batch to true, triggers one build at a time.
5+
# if there is a push while a build in progress, it will wait,
6+
# until the running build finishes, and produce a build with all the changes
7+
# that happened during the last build.
8+
trigger: none
9+
10+
schedules:
11+
- cron: "0 9,21 * * *" # run at 9:00 and 21:00 (UTC) which is 1:00 and 13:00 (PST).
12+
displayName: grpc-dotnet Android client test schedule
13+
branches:
14+
include:
15+
- main
16+
always: true
17+
18+
variables:
19+
- template: /eng/pipelines/common/variables.yml
20+
21+
jobs:
22+
23+
#
24+
# Android emulators
25+
# Build the whole product using Mono and run libraries tests
26+
#
27+
- template: /eng/pipelines/common/platform-matrix.yml
28+
parameters:
29+
jobTemplate: /eng/pipelines/common/global-build-job.yml
30+
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
31+
buildConfig: Release
32+
runtimeFlavor: mono
33+
platforms:
34+
- Android_x64
35+
jobParameters:
36+
testGroup: innerloop
37+
nameSuffix: AllSubsets_Mono_gRPC
38+
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunGrpcTestsOnly=true /p:BuildGrpcServerDockerImage=true
39+
timeoutInMinutes: 180
40+
# extra steps, run tests
41+
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
42+
extraStepsParameters:
43+
creator: dotnet-bot
44+
extraHelixArguments: /p:RunGrpcTestsOnly=true /p:BuildGrpcServerDockerImage=true
45+
testRunNamePrefixSuffix: Mono_$(_BuildConfig)

src/libraries/sendtohelixhelp.proj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@
155155
<HelixProperties Condition="'$(Scenario)' != ''" Include="scenario" Value="$(Scenario)" />
156156
</ItemGroup>
157157

158+
<ItemGroup Condition="'$(RunGrpcTestsOnly)' == 'true' and '$(BuildGrpcServerDockerImage)' == 'true'">
159+
<HelixCorrelationPayload Include="$(GrpcServerDockerImageDir)" Destination="grpcserver" />
160+
<HelixPreCommand Include="docker load -i $HELIX_CORRELATION_PAYLOAD/grpcserver/grpcserver.tar" />
161+
<HelixPreCommand Include="docker run --name grpc-server -d -p 50052:50052 -p 80:80 grpc-server:latest" />
162+
<HelixPostCommand Include="docker stop grpc-server" />
163+
<HelixPostCommand Include="docker rmi -f grpc-server:latest" />
164+
</ItemGroup>
165+
158166
<!-- Ensure that all HelixPreCommand items are ready before this -->
159167
<Target Name="BuildHelixCommand">
160168
<!-- setting DotNetCliVersion here to ensure that it is set to the intended value -->
@@ -165,6 +173,7 @@
165173

166174
<PropertyGroup>
167175
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
176+
<HelixPostCommands>@(HelixPostCommand)</HelixPostCommands>
168177
<HelixCommandPrefix Condition="'$(WindowsShell)' == 'true' and @(HelixCommandPrefixItem->Count()) > 0" >$(HelixCommandPrefix) @(HelixCommandPrefixItem -> 'set &quot;%(Identity)&quot;', ' &amp; ')</HelixCommandPrefix>
169178
<HelixCommandPrefix Condition="'$(WindowsShell)' != 'true' and @(HelixCommandPrefixItem->Count()) > 0 ">$(HelixCommandPrefix) @(HelixCommandPrefixItem, ' ')</HelixCommandPrefix>
170179
<IncludeHelixCorrelationPayload Condition="'$(IncludeHelixCorrelationPayload)' == '' and '$(HelixCorrelationPayload)' != ''">true</IncludeHelixCorrelationPayload>

src/libraries/tests.proj

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
<!-- Crashes on CI (possibly flakey) -->
196196
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Private.Xml/tests/Misc/System.Xml.Misc.Tests.csproj" />
197197
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj"/>
198+
199+
<!-- gRPC tests should be run only manually -->
200+
<ProjectExclusions Include="$(RepoRoot)\src\tests\FunctionalTests\Android\Device_Emulator\gRPC\Android.Device_Emulator.gRPC.Test.csproj" />
198201
</ItemGroup>
199202

200203
<ItemGroup Condition="('$(TargetOS)' == 'Android' or '$(TargetsLinuxBionic)' == 'true') and '$(TargetArchitecture)' == 'arm64' and '$(RunDisabledAndroidTests)' != 'true'">
@@ -540,7 +543,8 @@
540543
</ItemGroup>
541544

542545
<ItemGroup>
543-
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests.csproj" />
546+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests.csproj" />
547+
<GrpcTestProject Include="$(RepoRoot)\src\tests\FunctionalTests\Android\Device_Emulator\gRPC\Android.Device_Emulator.gRPC.Test.csproj" />
544548
</ItemGroup>
545549

546550
<ItemGroup Condition="'$(TestNativeAot)' == 'true'">
@@ -560,9 +564,11 @@
560564
<ProjectReference Condition="'$(RunHighAOTResourceRequiringTestsOnly)' == 'true'"
561565
Include="@(HighAOTResourceRequiringProject)"
562566
BuildInParallel="false" />
567+
<ProjectReference Condition="'$(RunGrpcTestsOnly)' == 'true'"
568+
Include="@(GrpcTestProject)" />
563569
</ItemGroup>
564570

565-
<ItemGroup Condition="'$(RunSmokeTestsOnly)' != 'true' and '$(RunHighAOTResourceRequiringTestsOnly)' != 'true'">
571+
<ItemGroup Condition="'$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(RunHighAOTResourceRequiringTestsOnly)' != 'true'">
566572
<ProjectReference Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj"
567573
Exclude="@(ProjectExclusions)"
568574
Condition="'$(TestAssemblies)' == 'true'" />
@@ -606,7 +612,7 @@
606612
<ProjectReference Include="$(MSBuildThisFileDirectory)System.Formats.Cbor\tests\System.Formats.Cbor.Tests.csproj" />
607613
</ItemGroup>
608614

609-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(TargetOS)' == 'iOSSimulator'">
615+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'iOSSimulator'">
610616
<!-- https://github.com/dotnet/runtime/issues/57666 -->
611617
<!-- <ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
612618
BuildInParallel="false" /> -->
@@ -615,13 +621,13 @@
615621
BuildInParallel="false" />
616622
</ItemGroup>
617623

618-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(TargetOS)' == 'tvOS'">
624+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'tvOS'">
619625
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\tvOS\Device\**\*.Test.csproj"
620626
Exclude="@(ProjectExclusions)"
621627
BuildInParallel="false" />
622628
</ItemGroup>
623629

624-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(TargetOS)' == 'MacCatalyst'">
630+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'MacCatalyst'">
625631
<!-- https://github.com/dotnet/runtime/issues/57666 -->
626632
<!-- <ProjectReference Include="$(MonoProjectRoot)sample\iOS\Program.csproj"
627633
BuildInParallel="false" /> -->
@@ -630,13 +636,13 @@
630636
BuildInParallel="false" />
631637
</ItemGroup>
632638

633-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(TargetOS)' == 'tvOSSimulator'">
639+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'tvOSSimulator'">
634640
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\tvOS\Simulator\**\*.Test.csproj"
635641
Exclude="@(ProjectExclusions)"
636642
BuildInParallel="false" />
637643
</ItemGroup>
638644

639-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(TargetOS)' == 'Android'">
645+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'Android'">
640646
<ProjectReference Include="$(MonoProjectRoot)sample\Android\AndroidSampleApp.csproj"
641647
BuildInParallel="false" />
642648
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\Android\**\*.Test.csproj"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TestRuntime>true</TestRuntime>
5+
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
6+
<MainLibraryFileName>Android.Device_Emulator.gRPC.Test.dll</MainLibraryFileName>
7+
<ExpectedExitCode>42</ExpectedExitCode>
8+
9+
<MonoForceInterpreter>false</MonoForceInterpreter>
10+
<RunAOTCompilation>true</RunAOTCompilation>
11+
<ForceAOT>true</ForceAOT>
12+
<AOTWithLibraryFiles>true</AOTWithLibraryFiles>
13+
14+
<PublishTrimmed>true</PublishTrimmed>
15+
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>
16+
17+
<ImplicitUsings>enable</ImplicitUsings>
18+
<Nullable>enable</Nullable>
19+
<!-- Disable CS8981 because the generated code from the protobuf files contains classes with lowercase names -->
20+
<!-- Disable SYSLIB0039 because the tests intentionally use TLS 1.0 and 1.1 -->
21+
<NoWarn>CS8981;SYSLIB0039</NoWarn>
22+
</PropertyGroup>
23+
24+
<PropertyGroup>
25+
<IncludeNetworkSecurityConfig>true</IncludeNetworkSecurityConfig>
26+
</PropertyGroup>
27+
28+
<ItemGroup>
29+
<Compile Include="Program.cs" />
30+
31+
<None Include="$(MSBuildProjectDirectory)\res\**\*">
32+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
33+
</None>
34+
</ItemGroup>
35+
36+
<!-- Based on grpc-dotnet's testassets/InteropTestsClient/InteropTestsClient.csproj -->
37+
<ItemGroup>
38+
<!-- Required for QUIC & HTTP/3 in .NET 6 - https://github.com/dotnet/runtime/pull/55332 -->
39+
<RuntimeHostConfigurationOption Include="System.Net.SocketsHttpHandler.Http3Support" Value="true" />
40+
41+
<Compile Include="$(MSBuildProjectDirectory)\grpc-dotnet\testassets\Shared\*.cs" />
42+
<Compile Include="$(MSBuildProjectDirectory)\grpc-dotnet\test\Shared\HttpEventSourceListener.cs" />
43+
44+
<Protobuf
45+
Include="$(MSBuildProjectDirectory)\grpc-dotnet\testassets\Proto\grpc\testing\*.proto"
46+
ProtoRoot="$(MSBuildProjectDirectory)\grpc-dotnet\testassets\Proto\grpc\testing\"
47+
GrpcServices="Client" />
48+
49+
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufVersion)" />
50+
<PackageReference Include="Grpc.Auth" Version="$(GrpcAuthVersion)" />
51+
<PackageReference Include="Grpc.Core" Version="$(GrpcCoreVersion)" PrivateAssets="All" />
52+
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotnetClientVersion)" />
53+
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsVersion)" PrivateAssets="All" />
54+
</ItemGroup>
55+
56+
<Target Name="BuildServerDockerImage" AfterTargets="Build" Condition="'$(BuildGrpcServerDockerImage)' == 'true'">
57+
<Exec Command="cp $(RepoRoot)eng/Versions.props grpc-dotnet/testassets/InteropTestsWebsite/" />
58+
<Exec Command="docker build -t grpc-server:latest grpc-dotnet/testassets/" />
59+
<Exec Command="mkdir -p $(ArtifactsObjDir)/grpcserver/docker/" />
60+
<Exec Command="docker save -o $(ArtifactsObjDir)/grpcserver/docker/grpcserver.tar grpc-server:latest" />
61+
</Target>
62+
</Project>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System;
5+
using System.Diagnostics.CodeAnalysis;
6+
7+
// The code of the tests is cloned from https://github.com/grpc/grpc-dotnet
8+
using Grpc.Shared.TestAssets;
9+
10+
var skippedTests = new[]
11+
{
12+
"compute_engine_creds",
13+
"jwt_token_creds",
14+
"oauth2_auth_token",
15+
"per_rpc_creds",
16+
"client_compressed_streaming", // flaky test
17+
};
18+
19+
var configurations = new[]
20+
{
21+
new ClientOptions
22+
{
23+
ServerHost = "10.0.2.2",
24+
ServerPort = 50052,
25+
UseTls = true,
26+
},
27+
};
28+
29+
int failedTests = 0;
30+
31+
foreach (var options in configurations)
32+
{
33+
Console.WriteLine($"""
34+
gRPC client options:
35+
--------------------
36+
ClientType: {options.ClientType}
37+
ServerHost: {options.ServerHost}
38+
ServerHostOverride: {options.ServerHostOverride}
39+
ServerPort: {options.ServerPort}
40+
UseTls: {options.UseTls}
41+
UseTestCa: {options.UseTestCa}
42+
DefaultServiceAccount: {options.DefaultServiceAccount}
43+
OAuthScope: {options.OAuthScope}
44+
ServiceAccountKeyFile: {options.ServiceAccountKeyFile}
45+
UseHttp3: {options.UseHttp3}
46+
---
47+
""");
48+
49+
foreach (var testName in InteropClient.TestNames)
50+
{
51+
if (skippedTests.Contains(testName))
52+
{
53+
Log(testName, "SKIPPED");
54+
continue;
55+
}
56+
57+
options.TestCase = testName;
58+
var client = new InteropClientWrapper(options);
59+
60+
try
61+
{
62+
Log(testName, "STARTED");
63+
await client.Run();
64+
Log(testName, "PASSED");
65+
} catch (Exception e) {
66+
Log(testName, "FAILED");
67+
Console.Error.WriteLine(e);
68+
failedTests++;
69+
}
70+
}
71+
}
72+
73+
return 42 + failedTests;
74+
75+
void Log(string testName, string status)
76+
=> Console.WriteLine($"TestCase: {testName} ... {status}");
77+
78+
sealed class InteropClientWrapper
79+
{
80+
private readonly InteropClient _interopClient;
81+
82+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, "Grpc.Testing.TestService.TestServiceClient", "Android.Device_Emulator.gRPC.Test")]
83+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, "Grpc.Testing.UnimplementedService.UnimplementedServiceClient", "Android.Device_Emulator.gRPC.Test")]
84+
public InteropClientWrapper(ClientOptions options)
85+
{
86+
_interopClient = new InteropClient(options);
87+
}
88+
89+
public Task Run()
90+
=> _interopClient.Run();
91+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
res - Android resource folder containing self-signed certificates and Android network configuration
2+
dotnet-grpc - copied from https://github.com/grpc/grpc-dotnet

0 commit comments

Comments
 (0)