-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1518 from NASA-AMMOS/feature/sim_error_stacktrace
Include the Sim Error Activity Type Stack trace
- Loading branch information
Showing
10 changed files
with
123 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...model/src/main/java/gov/nasa/jpl/aerie/foomissionmodel/activities/DaemonTaskActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package gov.nasa.jpl.aerie.foomissionmodel.activities; | ||
|
||
import gov.nasa.jpl.aerie.foomissionmodel.Mission; | ||
import gov.nasa.jpl.aerie.merlin.framework.annotations.ActivityType; | ||
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration; | ||
|
||
import static gov.nasa.jpl.aerie.foomissionmodel.generated.ActivityActions.call; | ||
import static gov.nasa.jpl.aerie.merlin.framework.ModelActions.delay; | ||
|
||
/** | ||
* An activity that spawns a DaemonCheckerSpawner which spawns a DaemonCheckerActivity after delaying. | ||
* Useful for testing the behavior of exceptions thrown by child activities and the stack trace back | ||
* to this activity. | ||
* | ||
* @param minutesElapsed The expected number of minutes elapsed when the DaemonCheckerActivity begins | ||
* @param spawnDelay The number of minutes to delay between the start of this activity and spawning the DaemonCheckerActivity | ||
*/ | ||
@ActivityType("DaemonTaskActivity") | ||
public record DaemonTaskActivity(int minutesElapsed, int spawnDelay) { | ||
@ActivityType.EffectModel | ||
public void run(final Mission mission) { | ||
delay(Duration.of(spawnDelay, Duration.MINUTE)); | ||
call(mission, new DaemonCheckerSpawner(minutesElapsed,spawnDelay)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/engine/DirectiveDetail.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package gov.nasa.jpl.aerie.merlin.driver.engine; | ||
|
||
import gov.nasa.jpl.aerie.merlin.driver.ActivityDirectiveId; | ||
import gov.nasa.jpl.aerie.merlin.driver.SerializedActivity; | ||
import gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public record DirectiveDetail(Optional<ActivityDirectiveId> directiveId, List<SerializedActivity> activityStackTrace) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters