| This test, when run with 'all' target performs the following steps: |
| |
| - build |
| - setup |
| - start-database |
| - startDomain |
| - setup-database (add jdbc resource for the timer resource and set it as the timer resource) |
| - setup-cluster (create cluster of 2 instances, enable resource in the cluster) |
| - deploy (deploy the application which automatically starts ''timer01'' randomly on one of the instances - check the instance logs to see which one) |
| |
| - run |
| - run-test (verify that automatic timer is executed on one and only one instance) |
| Deploy randomly assigns an instance to own automatic timer and it is started on that instance when the bean is loaded. |
| Test adds a new programmatic timer on each instance during verification call. |
| Test creates files to hold port for the instance that owns the automatic timer ('success') and the one that does not ('error') |
| Expected result: automatic timer was executed on one and only one instance |
| - run-failover (verify that timers are automatically migrated to another instance, when the instance that originally runs them is stopped) |
| Test identifies the instance (reading the files from the step above) that owns automatic timer and stops that instance. |
| Test verifies that after a small sleep the timers are executed on the other instance. |
| Expected result: all 3 timers are executed on the other instance |
| |
| - undeploy |
| - unsetup |
| - unsetup-cluster (stop and delete the cluster) |
| - unsetup-database (remove resource and unset timer resource) |
| - stop-database |
| - stopDomain |
| |