Fix tests, also on windows

Should fix the timeouts in windows tests, too.

thanks @davglass i've included your patches. :)