Skip to content

Commit e8b8d19

Browse files
committed
Redirect stdout and stderr to console in integration tests output consumer
1 parent c0ee834 commit e8b8d19

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/Demo.Tests/Config/IntegrationTestsFactory.cs

+9-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public IntegrationTestsFactory()
3434
.WithNetworkAliases(sqlContainerName)
3535
.WithWaitStrategy(Wait.ForUnixContainer()
3636
.UntilMessageIsLogged("SQL Server is now ready for client connections.", w => w.WithTimeout(TimeSpan.FromSeconds(10))))
37-
.WithOutputConsumer(Consume.DoNotConsumeStdoutAndStderr())
37+
.WithOutputConsumer(
38+
Consume.RedirectStdoutAndStderrToStream(
39+
Console.OpenStandardOutput(),
40+
Console.OpenStandardError()))
3841
.Build();
3942

4043
_serviceBusContainer = new ContainerBuilder()
@@ -48,8 +51,11 @@ public IntegrationTestsFactory()
4851
"/ServiceBus_Emulator/ConfigFiles/Config.json")
4952
.WithNetwork(_containersNetwork)
5053
.WithWaitStrategy(Wait.ForUnixContainer()
51-
.UntilMessageIsLogged("Emulator Service is Successfully Up!", w => w.WithTimeout(TimeSpan.FromSeconds(30))))
52-
.WithOutputConsumer(Consume.DoNotConsumeStdoutAndStderr())
54+
.UntilMessageIsLogged("Emulator Service is Successfully Up!", w => w.WithTimeout(TimeSpan.FromSeconds(60))))
55+
.WithOutputConsumer(
56+
Consume.RedirectStdoutAndStderrToStream(
57+
Console.OpenStandardOutput(),
58+
Console.OpenStandardError()))
5359
.Build();
5460
}
5561

0 commit comments

Comments
 (0)