test improvements

data and config files in isolated test environment
use random ephemeral port to avoid timeout issues