14886: Updates test to fail for the more specific case
authorEric Biagiotti <ebiagiotti@veritasgenetics.com>
Mon, 4 Mar 2019 19:44:39 +0000 (14:44 -0500)
committerEric Biagiotti <ebiagiotti@veritasgenetics.com>
Mon, 4 Mar 2019 19:44:39 +0000 (14:44 -0500)
Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti@veritasgenetics.com>

sdk/cwl/tests/test_container.py

index 6ca5827a0ec1811ef1aebc8d94e6667bea4915e2..4d6bcd2f6863b1217e4f8227e2aeaec8e2e6248b 100644 (file)
@@ -500,7 +500,6 @@ class TestContainer(unittest.TestCase):
         arvjob.output_callback.assert_called_with({"out": "stuff"}, "success")
         runner.add_intermediate_output.assert_called_with("zzzzz-4zz18-zzzzzzzzzzzzzz2")
 
-    # Test for issue 14886
     # Test to make sure we dont call runtime_status_update if we already did
     # some where higher up in the call stack
     @mock.patch("arvados_cwl.util.get_current_container")
@@ -520,7 +519,10 @@ class TestContainer(unittest.TestCase):
         # get_current_container is invoked when we call runtime_status_update
         # so try and log again!
         gcc_mock.side_effect = lambda *args: root_logger.error("Second Error")
-        root_logger.error("First Error")
+        try: 
+            root_logger.error("First Error")
+        except RuntimeError as e: 
+            self.fail(str(e))
 
     @mock.patch("arvados_cwl.util.get_current_container")
     @mock.patch("arvados.collection.CollectionReader")