Skip to content

Commit

Permalink
Merge pull request Cysharp#477 from Cysharp/hotfix/FixWarnings
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
mayuki authored Nov 24, 2021
2 parents da8d52e + dc9735c commit c002fd9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/MagicOnion.Server/MagicOnionEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static MagicOnionServiceDefinition BuildServerServiceDefinition(IServiceP
}

streamingHubHandlers.AddRange(tempStreamingHubHandlers!);
StreamingHubHandlerRepository.RegisterHandler(connectHandler, tempStreamingHubHandlers.ToArray());
StreamingHubHandlerRepository.RegisterHandler(connectHandler, tempStreamingHubHandlers!.ToArray());
IGroupRepositoryFactory factory;
var attr = classType.GetCustomAttribute<GroupConfigurationAttribute>(true);
if (attr != null)
Expand Down
26 changes: 13 additions & 13 deletions tests/MagicOnion.Server.Tests/Tests/StreamingHubTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public async Task ZeroArgument()
{
try
{
client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
await client.ZeroArgument();
await voidZeroTask.Task;
//await zeroTask.Task;
Expand All @@ -167,7 +167,7 @@ public async Task ZeroArgument()
[Fact]
public async Task OneArgument()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
await client.OneArgument(100);
//var x = await oneTask.Task;
var y = await voidoneTask.Task;
Expand All @@ -179,7 +179,7 @@ public async Task OneArgument()
[Fact]
public async Task MoreArgument()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
await client.MoreArgument(100, "foo", 10.3);
//var x = await moreTask.Task;
var y = await voidmoreTask.Task;
Expand All @@ -191,23 +191,23 @@ public async Task MoreArgument()
[Fact]
public async Task RetrunZeroArgument()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
var v = await client.RetrunZeroArgument();
v.Should().Be(1000);
await client.DisposeAsync();
}
[Fact]
public async Task RetrunOneArgument()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
var v = await client.RetrunZeroArgument();
v.Should().Be(1000);
await client.DisposeAsync();
}
[Fact]
public async Task RetrunMoreArgument()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
var v = await client.RetrunMoreArgument(10, "foo", 30.4);
v.Should().Be(30.4);
await client.DisposeAsync();
Expand All @@ -216,7 +216,7 @@ public async Task RetrunMoreArgument()
[Fact]
public async Task OneArgument2()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
await client.OneArgument2(new TestObject() { X = 10, Y = 99, Z = 100 });
{
//var v = await one2Task.Task;
Expand All @@ -235,7 +235,7 @@ public async Task OneArgument2()
[Fact]
public async Task RetrunOneArgument2()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
var v = await client.RetrunOneArgument2(new TestObject() { X = 10, Y = 99, Z = 100 });
v.X.Should().Be(10);
v.Y.Should().Be(99);
Expand All @@ -246,7 +246,7 @@ public async Task RetrunOneArgument2()
[Fact]
public async Task OneArgument3()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
await client.OneArgument3(new[]
{
new TestObject() { X = 10, Y = 99, Z = 100 },
Expand Down Expand Up @@ -288,7 +288,7 @@ await client.OneArgument3(new[]
[Fact]
public async Task RetrunOneArgument3()
{
var client = StreamingHubClient.Connect<ITestHub, IMessageReceiver>(channel, this);
var client = await StreamingHubClient.ConnectAsync<ITestHub, IMessageReceiver>(channel, this);
var v = await client.RetrunOneArgument3(new[]
{
new TestObject() { X = 10, Y = 99, Z = 100 },
Expand Down Expand Up @@ -440,7 +440,7 @@ public MoreCheckHubTest(ITestOutputHelper logger, ServerFixture<MoreCheckHub> se
[Fact]
public async Task ReceiveEx()
{
client = StreamingHubClient.Connect<IMoreCheckHub, IEmptyReceiver>(channel, this);
client = await StreamingHubClient.ConnectAsync<IMoreCheckHub, IEmptyReceiver>(channel, this);

var ex = Assert.Throws<RpcException>(() =>
{
Expand All @@ -456,7 +456,7 @@ public async Task ReceiveEx()
[Fact]
public async Task StatusCodeEx()
{
client = StreamingHubClient.Connect<IMoreCheckHub, IEmptyReceiver>(channel, this);
client = await StreamingHubClient.ConnectAsync<IMoreCheckHub, IEmptyReceiver>(channel, this);

var ex = Assert.Throws<RpcException>(() =>
{
Expand All @@ -473,7 +473,7 @@ public async Task StatusCodeEx()
[Fact]
public async Task Filter()
{
client = StreamingHubClient.Connect<IMoreCheckHub, IEmptyReceiver>(channel, this);
client = await StreamingHubClient.ConnectAsync<IMoreCheckHub, IEmptyReceiver>(channel, this);
await client.FilterCheckAsync();
}

Expand Down

0 comments on commit c002fd9

Please sign in to comment.