@@ -116,7 +116,7 @@ def test_run_with_emissions_offline(speedy_heartbeat, mock_co2_signal, create_pl
116116 run_created .config (enable_emission_metrics = True )
117117 time .sleep (5 )
118118 # Run should continue, but fail to log metrics until sender runs and creates file
119- id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ])
119+ id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], throw_exceptions = True )
120120 _run = RunObject (identifier = id_mapping [run_created .id ])
121121 _metric_names = [item [0 ] for item in _run .metrics ]
122122 for _metric in ["emissions" , "energy_consumed" ]:
@@ -126,7 +126,7 @@ def test_run_with_emissions_offline(speedy_heartbeat, mock_co2_signal, create_pl
126126 assert _delta_metric_name not in _metric_names
127127 # Sender should now have made a local file, and the run should be able to use it to create emissions metrics
128128 time .sleep (5 )
129- id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ])
129+ id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], throw_exceptions = True )
130130 _run .refresh ()
131131 _metric_names = [item [0 ] for item in _run .metrics ]
132132 client = sv_cl .Client ()
@@ -318,7 +318,7 @@ def test_log_metrics_offline(
318318 run .log_metrics (METRICS )
319319
320320 time .sleep (1 )
321- id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
321+ id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
322322 time .sleep (1 )
323323
324324 if metric_type == "tensor" :
@@ -441,7 +441,7 @@ def test_visibility_offline(
441441 retention_period = os .environ .get ("SIMVUE_TESTING_RETENTION_PERIOD" , "2 mins" ),
442442 )
443443 _id = run .id
444- _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
444+ _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
445445 run .close ()
446446 _retrieved_run = RunObject (identifier = _id_mapping .get (_id ))
447447
@@ -478,7 +478,7 @@ def test_log_events_offline(create_plain_run_offline: tuple[sv_run.Run, dict]) -
478478 run , _ = create_plain_run_offline
479479 run_name = run .name
480480 run .log_event (EVENT_MSG )
481- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
481+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
482482 client = sv_cl .Client ()
483483 attempts : int = 0
484484
@@ -488,7 +488,7 @@ def test_log_events_offline(create_plain_run_offline: tuple[sv_run.Run, dict]) -
488488 not (event_data := client .get_events (client .get_run_id_from_name (run_name ), count_limit = 1 ))
489489 ) and attempts < 5 :
490490 time .sleep (1 )
491- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
491+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
492492 attempts += 1
493493 assert event_data [0 ].get ("message" , EVENT_MSG )
494494
@@ -497,7 +497,7 @@ def test_log_events_offline(create_plain_run_offline: tuple[sv_run.Run, dict]) -
497497@pytest .mark .offline
498498def test_offline_tags (create_plain_run_offline : tuple [sv_run .Run , dict ]) -> None :
499499 run , run_data = create_plain_run_offline
500- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
500+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
501501 client = sv_cl .Client ()
502502
503503 tags = client .get_tags ()
@@ -557,7 +557,7 @@ def test_update_metadata_offline(
557557 # Try updating an already defined piece of metadata
558558 run .update_metadata ({"a" : 1 })
559559
560- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
560+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
561561
562562 client = sv_cl .Client ()
563563 run_info = client .get_run (client .get_run_id_from_name (run_name ))
@@ -945,7 +945,7 @@ def test_save_file_offline(
945945 "w" ,
946946 ) as out_f :
947947 out_f .write ("updated file!" )
948- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
948+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
949949 os .remove (out_name )
950950 client = sv_cl .Client ()
951951 base_name = name or out_name .name
@@ -1031,7 +1031,7 @@ def test_update_tags_offline(
10311031
10321032 simvue_run .update_tags (["additional" ])
10331033
1034- sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
1034+ sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
10351035
10361036 client = sv_cl .Client ()
10371037 run_data = client .get_run (client .get_run_id_from_name (run_name ))
@@ -1358,7 +1358,7 @@ def test_reconnect_functionality(mode, monkeypatch: pytest.MonkeyPatch) -> None:
13581358 )
13591359 run_id = run .id
13601360 if mode == "offline" :
1361- _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
1361+ _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
13621362 run_id = _id_mapping .get (run_id )
13631363
13641364 client = simvue .Client ()
@@ -1372,7 +1372,7 @@ def test_reconnect_functionality(mode, monkeypatch: pytest.MonkeyPatch) -> None:
13721372 run .log_event ("Testing!" )
13731373
13741374 if mode == "offline" :
1375- _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 )
1375+ _id_mapping = sv_send .sender (os .environ ["SIMVUE_OFFLINE_DIRECTORY" ], 2 , 10 , throw_exceptions = True )
13761376
13771377 _reconnected_run = client .get_run (run_id )
13781378 assert dict (_reconnected_run .metrics )["test_metric" ]["last" ] == 1
0 commit comments