Skip to content

Commit 859b65f

Browse files
fix: test probably time outs. Maybe because the listener is opened, but doesn't accept connections
1 parent f4c85fe commit 859b65f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Testcontainers.Platform.Windows.Tests/WindowsContainerTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public UntilHostTcpPortIsAvailable()
7070
: base(new ContainerBuilder()
7171
.WithImage(CommonImages.ServerCore)
7272
.WithEntrypoint("PowerShell", "-NoLogo", "-Command")
73-
.WithCommand("$tcpListener = [System.Net.Sockets.TcpListener]80; $tcpListener.Start(); Start-Sleep -Seconds 120")
73+
.WithCommand("$tcpListener = [System.Net.Sockets.TcpListener]80; $tcpListener.Start();$client = $tcpListener.AcceptTcpClient(); Start-Sleep -Seconds 120")
7474
.WithWaitStrategy(Wait.ForWindowsContainer().UntilHostTcpPortAvailable(80))
7575
.Build())
7676
{

0 commit comments

Comments
 (0)