• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThreeMammals / Ocelot / 16319303742

16 Jul 2025 12:21PM UTC coverage: 85.723% (-0.02%) from 85.741%
16319303742

push

github

0fd0c6
web-flow
#2299 Encapsulate ServiceAccountPath as a protected property of the factory to stabilize KubeApiClient creation in the Kubernetes provider (#2302)

* Fix bug with abstract NullLoggerFactory not updating KubeClientOptions.LoggerFactory prop, leading to ignored Ocelot logger instances
* Steps to reproduce
* Encapsulate ServiceAccountPath deeply as a protected property
* Coveralls step of GitHub Actions

4 of 4 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

5458 of 6367 relevant lines covered (85.72%)

5685.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
src/Ocelot/Requester/TimeoutDelegatingHandler.cs
1
namespace Ocelot.Requester;
2

3
public class TimeoutDelegatingHandler : DelegatingHandler
4
{
5
    private readonly TimeSpan _timeout;
6

7
    /// <summary>
8
    /// Initializes a new instance of the <see cref="TimeoutDelegatingHandler"/> class.
9
    /// </summary>
10
    /// <param name="timeout">The time span after which the request is cancelled.</param>
11
    public TimeoutDelegatingHandler(TimeSpan timeout)
8✔
12
    {
13
        _timeout = timeout;
8✔
14
    }
8✔
15

16
    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
17
        CancellationToken cancellationToken)
18
    {
19
        using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
6✔
20
        cts.CancelAfter(_timeout);
6✔
21

22
        try
23
        {
24
            return await base.SendAsync(request, cts.Token);
6✔
25
        }
UNCOV
26
        catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested)
×
27
        {
UNCOV
28
            throw new TimeoutException();
×
29
        }
30
    }
6✔
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc