Class LogicDrivenTrigger

java.lang.Object
ee.jakarta.tck.concurrent.api.LastExecution.LogicDrivenTrigger
All Implemented Interfaces:
Trigger

public class LogicDrivenTrigger extends Object implements Trigger
A trigger that driven by test logic. This trigger is used for test the logic of LastExecution, since trigger can not return value to the client, it is also not ensured to be able to visit jndi. We use the execution times to denote if the test runs successfully. If the trigger is triggered 2 times, the test passes, otherwise the test fails.
  • Field Details

  • Constructor Details

    • LogicDrivenTrigger

      public LogicDrivenTrigger(long delta, String testName)
  • Method Details

    • getNextRunTime

      public Date getNextRunTime(LastExecution lastExecutionInfo, Date taskScheduledTime)
      Specified by:
      getNextRunTime in interface Trigger
    • lastExecutionGetIdentityNameTest

      public Date lastExecutionGetIdentityNameTest(LastExecution lastExecutionInfo, Date taskScheduledTime)
    • lastExecutionGetResultRunnableTest

      public Date lastExecutionGetResultRunnableTest(LastExecution lastExecutionInfo, Date taskScheduledTime)
    • lastExecutionGetResultCallableTest

      public Date lastExecutionGetResultCallableTest(LastExecution lastExecutionInfo, Date taskScheduledTime)
    • lastExecutionGetRunningTimeTest

      public Date lastExecutionGetRunningTimeTest(LastExecution lastExecutionInfo, Date taskScheduledTime)
    • skipRun

      public boolean skipRun(LastExecution lastExecutionInfo, Date scheduledRunTime)
      Specified by:
      skipRun in interface Trigger