question: @ SuppressWarnings ( "SleepWhileInLoop" ) public static LocalStreamingContainer waitForActivation ( StramLocalCluster localCluster , PTOperator operator ) throws InterruptedException { LocalStreamingContainer container ; long startMillis = System . currentTimeMillis ( ) ; while ( System . currentTimeMillis ( ) < ( startMillis + DEFAULT_TIMEOUT_MILLIS ) ) { if ( operator . getState ( ) == PTOperator . State . ACTIVE ) { if ( ( container = localCluster . getContainer ( operator ) ) != null ) { return container ; } } LOG . debug ( "Waiting for {}({}) in container {}" , new Object [ ] { operator , operator . getState ( ) , operator . getContainer ( ) } ) ; Thread . sleep ( 500 ) ; } Assert . fail ( "timeout waiting for operator deployment " + operator ) ; return null ; }
target:  Wait until instance of operator is deployed into a container and return the container reference. Asserts non null return value.