diff --git a/__tests__/action.test.ts b/__tests__/action.test.ts index eb26db435..52dabc90a 100644 --- a/__tests__/action.test.ts +++ b/__tests__/action.test.ts @@ -40,7 +40,7 @@ class ReactorWithFederatePortAction extends App { } describe('Intended tag tests', function () { - it('Undefined inteded tag', function() { + it('Undefined intended tag', function() { intendedTagDelay = undefined let app = new ReactorWithFederatePortAction() expect(() => app._start()).toThrowError("FederatedPortAction must have an intended tag from RTI.") @@ -56,7 +56,7 @@ describe('Intended tag tests', function () { it('Intended tag equal to current tag', function() { intendedTagDelay = TimeValue.nsec(10) - intendedTagMicrostepDelay = 1 + intendedTagMicrostepDelay = 0 let app = new ReactorWithFederatePortAction() app.setLastTagProvisional(false) expect(() => app._start()).toThrowError("Intended tag must be greater than current tag. Intended tag: ") diff --git a/src/core/action.ts b/src/core/action.ts index d0ded6951..f22ed6c78 100644 --- a/src/core/action.ts +++ b/src/core/action.ts @@ -94,7 +94,7 @@ export abstract class SchedulableAction implements Sched { Log.debug(this, () => "Using intended tag from RTI, similar to schedule_at_tag(tag) with an intended tag: " + intendedTag); tag = intendedTag; - } else { + } else if (delay.isEqualTo(TimeValue.zero())) { tag = tag.getMicroStepsLater(1); }