Skip to content

Commit ef0ae8c

Browse files
Fix intermittent CI failure (#178)
* fix(waiting): increase timeout for test result polling * fix(kafka): set Acks to All for message producers --------- Signed-off-by: SebastienDegodez <[email protected]>
1 parent 2e3f43a commit ef0ae8c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Microcks.Testcontainers/MicrocksContainerExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static async Task<TestResult> TestEndpointAsync(
7878
try
7979
{
8080
await WaitForConditionAsync(async () => !(await RefreshTestResultAsync(httpEndpoint, testResultId, cancellationToken)).InProgress,
81-
atMost: TimeSpan.FromMilliseconds(1000).Add(testRequest.Timeout),
81+
atMost: TimeSpan.FromMilliseconds(3000).Add(testRequest.Timeout),
8282
delay: TimeSpan.FromMilliseconds(100),
8383
interval: TimeSpan.FromMilliseconds(200),
8484
cancellationToken);

tests/Microcks.Testcontainers.Tests/Async/Kafka/MicrocksAsyncKafkaFunctionalityTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public async Task ShouldReturnsCorrectStatusContractWhenGoodMessageIsEmitted()
108108
BootstrapServers = _fixture.KafkaContainer.GetBootstrapAddress()
109109
.Replace("PLAINTEXT://", "", StringComparison.OrdinalIgnoreCase),
110110
ClientId = $"test-client-{DateTime.Now.Ticks}",
111+
Acks = Acks.All
111112
};
112113

113114
using var producer = new ProducerBuilder<string, string>(producerConfig)
@@ -178,6 +179,7 @@ public async Task ShouldReturnsCorrectStatusContractWhenBadMessageIsEmitted()
178179
BootstrapServers = _fixture.KafkaContainer.GetBootstrapAddress()
179180
.Replace("PLAINTEXT://", "", StringComparison.OrdinalIgnoreCase),
180181
ClientId = $"test-client-{DateTime.Now.Ticks}",
182+
Acks = Acks.All
181183
};
182184

183185
using var producer = new ProducerBuilder<string, string>(producerConfig)

0 commit comments

Comments
 (0)