@@ -312,7 +312,8 @@ def test_run_tensorboard_locally_without_awscli_binary(time, strftime, popen, ca
312312@patch ('subprocess.Popen' )
313313@patch ('time.strftime' , return_value = TIMESTAMP )
314314@patch ('time.time' , return_value = TIME )
315- def test_run_tensorboard_locally (time , strftime , popen , call , access , rmtree , mkdtemp , sync , sagemaker_session ):
315+ @patch ('time.sleep' )
316+ def test_run_tensorboard_locally (sleep , time , strftime , popen , call , access , rmtree , mkdtemp , sync , sagemaker_session ):
316317 tf = TensorFlow (entry_point = SCRIPT_PATH , role = ROLE , sagemaker_session = sagemaker_session ,
317318 train_instance_count = INSTANCE_COUNT , train_instance_type = INSTANCE_TYPE )
318319
@@ -322,8 +323,7 @@ def test_run_tensorboard_locally(time, strftime, popen, call, access, rmtree, mk
322323
323324 popen .assert_called_with (['tensorboard' , '--logdir' , '/my/temp/folder' , '--host' , 'localhost' , '--port' , '6006' ],
324325 stderr = - 1 ,
325- stdout = - 1
326- )
326+ stdout = - 1 )
327327
328328
329329@patch ('sagemaker.tensorflow.estimator.Tensorboard._sync_directories' )
@@ -335,7 +335,8 @@ def test_run_tensorboard_locally(time, strftime, popen, call, access, rmtree, mk
335335@patch ('subprocess.Popen' )
336336@patch ('time.strftime' , return_value = TIMESTAMP )
337337@patch ('time.time' , return_value = TIME )
338- def test_run_tensorboard_locally_port_in_use (time , strftime , popen , call , access , socket , rmtree , mkdtemp , sync ,
338+ @patch ('time.sleep' )
339+ def test_run_tensorboard_locally_port_in_use (sleep , time , strftime , popen , call , access , socket , rmtree , mkdtemp , sync ,
339340 sagemaker_session ):
340341 tf = TensorFlow (entry_point = SCRIPT_PATH , role = ROLE , sagemaker_session = sagemaker_session ,
341342 train_instance_count = INSTANCE_COUNT , train_instance_type = INSTANCE_TYPE )
0 commit comments