Skip to content

Commit

Permalink
Replace Task.Delay in C# tests (#3203)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier authored Nov 27, 2024
1 parent 8c76edb commit e063552
Show file tree
Hide file tree
Showing 3 changed files with 1,102 additions and 1,173 deletions.
10 changes: 3 additions & 7 deletions csharp/test/Ice/ami/TestI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,13 @@ public override bool
return true;
}

public override async Task
opAsyncDispatchAsync(Ice.Current current)
{
await Task.Delay(10);
}
public override Task opAsyncDispatchAsync(Ice.Current current) => Task.CompletedTask;

public override async Task<int>
opWithResultAsyncDispatchAsync(Ice.Current current)
{
test(Thread.CurrentThread.Name.Contains("Ice.ThreadPool.Server"));
await Task.Delay(10);
await Task.Yield();
test(!Thread.CurrentThread.Name.Contains("Ice.ThreadPool.Server"));
return await self(current).opWithResultAsync();
}
Expand All @@ -146,7 +142,7 @@ public override async Task
opWithUEAsyncDispatchAsync(Ice.Current current)
{
test(Thread.CurrentThread.Name.Contains("Ice.ThreadPool.Server"));
await Task.Delay(10);
await Task.Yield();
test(!Thread.CurrentThread.Name.Contains("Ice.ThreadPool.Server"));
await self(current).opWithUEAsync();
}
Expand Down
Loading

0 comments on commit e063552

Please sign in to comment.