python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
HTTPClientFactory MOQ testing cancellationToken is true when running in normal, but when executing unit test case cancelation token is false
I am trying to make an PostAsync call using IHttpClientFactory , The cancellation token is working fine and exception is caught by CatchBlock.
But when trying to mock the method the Cancellation token...

Rupesh
Votes: 0
Answers: 1
What can I do about Azure Function leaking memory via CancellationTokenSource?
I'm analyzing the memory usage of Azure Functions under load test. When I run the template function with an HTTP trigger:
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.A...

Glorfindel
Votes: 0
Answers: 0
Why is the task from TaskCompletionSource not completed after 5 seconds?
When I set the CancellationTokenSource to cancel after 5 seconds. The TaskCompletionSource will not be cancelled.
[Test]
public async Task Test()
{
var cts = new CancellationTokenSource(TimeSpan.Fro...
Rene
Votes: 0
Answers: 1