Fix for CAMEL-7694 Eliminated race condition which caused intermittent test failures