I am working on testing java code (Apache commons net FTPClient) for fault tolerance to Windows 7 IIS FTP server. I need something that making Windows 7 IIS FTP server unavailable at random time by various reason.
So far for fault tolerance testing I created windows batch file that restarting Windows 7 IIS FTP server after random period of time.
@echo off :loop SET /A rn=%RANDOM% * 10 / 32768 + 1 echo %rn% ping -n %rn% 127.0.0.1 iisreset goto loop
I feel like it's not really a good test that is covering only the FTP server restart and not covering other various reason when FTP may be unavailable.
Is there a better option for making Windows 7 IIS FTP server unavailable randomly by various reasons?