fix indefinite hang in slow test environments