Test fix: em2 should be closed before we do latch.countDown()