-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create a Parent Activity, which will be used to spawn children 2 levels deep. This allows for the error message to have a more detail stacktrace * Look for the stacktrace and effected activity within the error message.
- Loading branch information
1 parent
b271a19
commit 521edac
Showing
3 changed files
with
43 additions
and
2 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