Skip to content

Commit 5f8c8e8

Browse files
Copilotsamtrion
andcommitted
fix: standardize test method names to PascalCase and update SuppressMessage justification
Agent-Logs-Url: https://github.com/dailydevops/pulse/sessions/6dda0741-f9e5-4596-9ad2-028cc33d0cbc Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
1 parent 6fe98db commit 5f8c8e8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/NetEvolve.Pulse.Kafka/Outbox/KafkaMessageTransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public async Task SendAsync(OutboxMessage message, CancellationToken cancellatio
7070
[SuppressMessage(
7171
"Performance",
7272
"CA1849:Call async methods when in an async method",
73-
Justification = "Intentional fire-and-forget batch pattern. Produce() enqueues messages with a delivery-report callback; awaiting ProduceAsync() per message would serialize delivery and defeat the purpose of batching."
73+
Justification = "Intentional fire-and-forget batch pattern. Produce() enqueues messages with a delivery-report callback; awaiting ProduceAsync() per message would serialize delivery and defeat the purpose of batching. The method is async only to await EnsureTopicAsync() for topic auto-creation before the fire-and-forget send loop."
7474
)]
7575
public async Task SendBatchAsync(IEnumerable<OutboxMessage> messages, CancellationToken cancellationToken = default)
7676
{

tests/NetEvolve.Pulse.Tests.Unit/Kafka/KafkaMessageTransportTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ CancellationToken cancellationToken
156156
}
157157

158158
[Test]
159-
public async Task SendAsync_AutoCreateTopics_true_creates_topic_before_producing(
159+
public async Task SendAsync_AutoCreateTopics_true_Creates_topic_before_producing(
160160
CancellationToken cancellationToken
161161
)
162162
{
@@ -176,7 +176,7 @@ CancellationToken cancellationToken
176176
}
177177

178178
[Test]
179-
public async Task SendAsync_AutoCreateTopics_false_skips_topic_creation(CancellationToken cancellationToken)
179+
public async Task SendAsync_AutoCreateTopics_false_Skips_topic_creation(CancellationToken cancellationToken)
180180
{
181181
using var producer = new FakeProducer();
182182
using var admin = new FakeAdminClient { BrokerCount = 1 };
@@ -193,7 +193,7 @@ public async Task SendAsync_AutoCreateTopics_false_skips_topic_creation(Cancella
193193
}
194194

195195
[Test]
196-
public async Task SendAsync_AutoCreateTopics_only_creates_topic_once_per_topic(CancellationToken cancellationToken)
196+
public async Task SendAsync_AutoCreateTopics_only_Creates_topic_once_per_topic(CancellationToken cancellationToken)
197197
{
198198
using var producer = new FakeProducer();
199199
using var admin = new FakeAdminClient { BrokerCount = 1 };
@@ -284,7 +284,7 @@ public async Task SendAsync_Creates_topic_without_retention_config_when_not_set(
284284
}
285285

286286
[Test]
287-
public async Task SendBatchAsync_AutoCreateTopics_false_skips_topic_creation(CancellationToken cancellationToken)
287+
public async Task SendBatchAsync_AutoCreateTopics_false_Skips_topic_creation(CancellationToken cancellationToken)
288288
{
289289
using var producer = new FakeProducer();
290290
using var admin = new FakeAdminClient { BrokerCount = 1 };

0 commit comments

Comments
 (0)