Automation Failures due to intermittent wifi disconnections

Hello Guys,

Writing this post to get some inputs on Automation test failures due to wifi disconnection. When we run test suite which runs over an hour or several hours, it is very much possible to loose wifi for few seconds or milliseconds and that eventually leads to failures of test cases which are difficult to handle as there is no definite pattern to these wifi disconnections.

What is best way to handle these? Please post what have you done in your framework to minimise this.

Regards,
Venkatesh