sandro/specjour

Worker tiemout feature?

pierreozoux opened this issue · 3 comments

It could be nice to have this feature.

I have a test that fail randomly, and the worker print the error, but doesn't quit. So it could be nice to have a timeout. Like if a worker doen't respond during 60sec, then the manager will kill him, and send the output if this worker to the dispatcher (with the computer name)

What do you think about it?

I can work on that if you give some tips to start quickly :)

Thanks,

Pierre

Ideally, this should never happen. Do you have any clues as to why the worker hangs? Is it using selenium or a webkit browser? I'm okay with adding some timeout code, I just wish it wasn't necessary.

The select statement (https://github.com/sandro/specjour/blob/master/lib/specjour/printer.rb#L25) takes a timeout option (4th argument?), so you could use that to check for long running workers every .5 seconds or so. The ready method sends a test to the worker. You could record the timestamp in the ready method, and check it within the select statement. It'd probably be best to create a client object, that knows the tests it has run, the current test, and the elapsed time. So, tracking time should be easy, the hard part is exiting gracefully. I'm not certain how to best do that.

We think that this is akephalos doing that (randomly..). Thanks for your help, I'll discuss with my team and let you know.

This is not priority anymore.