Skip to content

Commit

Permalink
Fixing fault case labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByDrescher committed Jan 30, 2025
1 parent e9bed12 commit 537c9f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vcell-cli/src/main/resources/test_cases.ndjson
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000708.omex","should_fail":false,"known_status":"PASS","known_failure_type":null,"known_failure_desc":null}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000709.omex","should_fail":false,"known_status":"PASS","known_failure_type":null,"known_failure_desc":null}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000710.omex","should_fail":false,"known_status":"FAIL","known_failure_type":"SBML_IMPORT_FAILURE","known_failure_desc":"Error binding global parameter 'Metabolite_0_0' to model: 'UNRESOLVED.initConc' is either not found in your model or is not allowed to be used in the current context"}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000711.omex","should_fail":false,"known_status":"FAIL","known_failure_type":"TOO_SLOW","known_failure_desc":"> 5 minutes - Failed execution: Model 'BIOMD0000000711_Hancioglu2007 - Human Immune Response to Influenza A virus.sedml_model' Task 'task1'. java.lang.RuntimeException: Could not execute code: Unexpected error: Process timed out"}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000711.omex","should_fail":false,"known_status":"FAIL","known_failure_type":"TIMEOUT_ENCOUNTERED","known_failure_desc":"> 5 minutes - Failed execution: Model 'BIOMD0000000711_Hancioglu2007 - Human Immune Response to Influenza A virus.sedml_model' Task 'task1'. java.lang.RuntimeException: Could not execute code: Unexpected error: Process timed out"}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000712.omex","should_fail":false,"known_status":"PASS","known_failure_type":null,"known_failure_desc":null}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000713.omex","should_fail":false,"known_status":"PASS","known_failure_type":null,"known_failure_desc":null}
{"test_collection":"SYSBIO_BIOMD","file_path":"BIOMD0000000714.omex","should_fail":false,"known_status":"PASS","known_failure_type":null,"known_failure_desc":null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public enum FailureType {
SEDML_UNSUPPORTED_MODEL_REFERENCE, // Model refers to either a non-existent model (invalid SED-ML) or to another model with changes (not supported yet)
SEDML_NON_UTC_SIMULATION_FOUND,
SEDML_SBML_LEVEL_CHANGE, // unsupported SBML Level change within the SED-ML
TOO_SLOW,
UNCATEGORIZED_FAULT,
UNITS_EXCEPTION,
UNKNOWN_IDENTIFIER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static FailureType determineFault(TraceEvent traceEvent){
private static FailureType determineFault(Exception caughtException){
String errorMessage = caughtException.getMessage();

if (caughtException instanceof TimeoutException) {
if (caughtException instanceof TimeoutException || errorMessage.contains("Process timed out")) {
return FailureType.TIMEOUT_ENCOUNTERED;
} else if (errorMessage.contains("refers to either a non-existent model")) { //"refers to either a non-existent model (invalid SED-ML) or to another model with changes (not supported yet)"
return FailureType.SEDML_UNSUPPORTED_MODEL_REFERENCE;
Expand Down Expand Up @@ -189,8 +189,6 @@ private static FailureType determineFault(Exception caughtException){
return FailureType.UNSUPPORTED_DELAY_SBML;
} else if (errorMessage.contains("are in unnamed module of loader")){
return FailureType.SBML_IMPORT_FAILURE;
} else if (errorMessage.contains("Process timed out")) {
return FailureType.TOO_SLOW;
}
return null;
}
Expand Down

0 comments on commit 537c9f1

Please sign in to comment.