Skip to content

Commit

Permalink
[tests] Wait for Kafka playground to be ready before waiting for mess…
Browse files Browse the repository at this point in the history
…ages (#5503)

* [tests] Wait for Kafka playground to be ready before waiting for

.. messages. The initial startup of the services can take some time to
get ready, and if a docker image needs to be pulled down too then that
increases the wait time.

Fixes #5489

* address review feedback from @ eerhardt
  • Loading branch information
radical authored Aug 30, 2024
1 parent dbdec1c commit 3b87964
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Aspire.Playground.Tests/ProjectSpecificTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ await app.WaitForTextAsync($"I'm Batman. - Batman")
await app.StopAsync();
}

[Fact(Skip = "https://github.com/dotnet/aspire/issues/5489")]
[Fact]
public async Task KafkaTest()
{
var appHostPath = Directory.GetFiles(AppContext.BaseDirectory, "KafkaBasic.AppHost.dll").Single();
Expand All @@ -39,6 +39,10 @@ public async Task KafkaTest()
await app.StartAsync();
await app.WaitForResources().WaitAsync(TimeSpan.FromMinutes(2));

// Wait for the producer to start sending messages
await app.WaitForTextAsync("Hello, World!").WaitAsync(TimeSpan.FromMinutes(5));

// Wait for the consumer to receive some messages
await WaitForAllTextAsync(app,
[
"Hello, World! 343",
Expand Down

0 comments on commit 3b87964

Please sign in to comment.