Make log ordering more consistent for tests