CP-3756: change how waiting for instances to terminate is tested - move test into conditional statement.
CP-3756: change how waiting for instances to terminate is tested - move test into conditional statement.

CPlus/cplus,CPlus/cplus,CPlus/cplus