konstantinvlasenko / PowerSlim

Fitnesse Slim implementation in PowerShell. PowerSlim makes it possible to use PowerShell in the acceptance testing
powerslim.org
GNU General Public License v3.0
48 stars 21 forks source link

Hangup effect #60

Open mikeplavsky opened 10 years ago

mikeplavsky commented 10 years ago

I see two issues with powerslim code which can lead to hangup effect:

This code does not have any checks or error handling for the situation when port is busy:

    $ps_server = New-Object System.Net.Sockets.TcpListener($args[0])

It means that based on these specifications:

http://fitnesse.org/FitNesse.UserGuide.SliM.SlimProtocol http://fitnesse.org/FitNesse.UserGuide.SliM.SlimProtocol.PortManagement

Fitnesse will start SlimServer and will be waiting probably forever till SlimServer sends Slim Version string

The second problem is with this code:

     $ps_fitnesse_client.Client.Poll(-1, [System.Net.Sockets.SelectMode]::SelectRead)

It does wait forever till Socket gets into the reading mode. IMHO waiting time should be restricted by time out.

mikeplavsky commented 10 years ago

I would start with the appropriate logging into file around the problem areas. Then we could detect what really happens.