Skip to content

fix: always call base class for HttpClient#352

Merged
vbreuss merged 1 commit intomainfrom
topic/fix-httpclient-base-call
Jan 7, 2026
Merged

fix: always call base class for HttpClient#352
vbreuss merged 1 commit intomainfrom
topic/fix-httpclient-base-call

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Jan 7, 2026

This PR fixes a bug in the source generator where HttpClient.Send methods were not always calling the base class implementation. The fix ensures that for HttpClient.Send* methods, the base class is always invoked regardless of mock setup, which is necessary for proper HttpClient functionality.

Key changes:

  • Modified method generation logic to always call base class for HttpClient.Send* methods
  • Restructured conditional logic to handle both void and non-void return types uniformly

@vbreuss vbreuss self-assigned this Jan 7, 2026
Copilot AI review requested due to automatic review settings January 7, 2026 14:52
@vbreuss vbreuss added the bug Something isn't working label Jan 7, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the source generator where HttpClient.Send methods were not always calling the base class implementation. The fix ensures that for HttpClient.Send* methods, the base class is always invoked regardless of mock setup, which is necessary for proper HttpClient functionality.

Key changes:

  • Modified method generation logic to always call base class for HttpClient.Send* methods
  • Restructured conditional logic to handle both void and non-void return types uniformly

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Test Results

    14 files  ±0      14 suites  ±0   5m 43s ⏱️ +37s
 1 839 tests ±0   1 838 ✅ ±0  1 💤 ±0  0 ❌ ±0 
12 266 runs  ±0  12 265 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 8a7c77f. ± Comparison against base commit 7c6582c.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 3.11GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.601 μs 0.0143 μs 0.0127 μs 0.2270 - 3.72 KB
Simple_Moq 181.346 μs 0.2707 μs 0.2261 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.731 μs 0.0140 μs 0.0110 μs 0.5493 0.0076 9.09 KB
Simple_FakeItEasy 6.379 μs 0.0256 μs 0.0214 μs 0.4959 - 8.11 KB

@vbreuss vbreuss merged commit 10b4bc1 into main Jan 7, 2026
12 checks passed
@vbreuss vbreuss deleted the topic/fix-httpclient-base-call branch January 7, 2026 16:09
@github-actions github-actions bot added the state: released The issue is released label Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

This is addressed in release v0.50.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants