Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

#

Scenario

Description

Expected results

1

Task exclusion in non-clustered environment

(1) Create a non-clustered environment (default midPoint installation, with default config - not using clustering nor JDBC job store)
(2) Remove all existing tasks.
(3) Import samples/tasks/limiting-parallel-execution.xml

Only one of Task1, Task2 should execute at any given moment.

The other one should display "retry in NNN seconds" in the "Scheduled to start again" column.

2

Suspending one of the tasks

(1) Choose a task from the pair that is currently executing and suspend it
(2) Wait until the retry time for the second task arrives

The task that was waiting should start.

3

Task exclusion in clustered environment

Repeat tests 1 and 2 in two-nodes cluster.

The tests should behave in the same way as in non-clustered environment.

4Running 2 out of 3 tasks - non-clustered

(1) Create a non-clustered environment.
(2) Remove all existing tasks.
(3) Import samples/tasks/limiting-parallel-execution-2.xml

Only two of Task1, Task2, Task3 should execute at any given moment.

The other one should display "retry in NNN seconds". The NNN should go down from 17 to 1.

5Suspending one of the tasks

(1) Choose a task from the three that is currently executing and suspend it
(2) Wait until the retry time for the waiting task arrives

The task that was waiting should start.
6"2 of 3" task exclusion in clustered environmentRepeat tests 4 and 5 in two-nodes cluster.The tests should behave in the same way as in non-clustered environment.

Node-sticky tasks (MID-4062)

#

Scenario

Description

Expected results

1

No capabilities required

(1) Start with 2-nodes cluster, without any custom tasks.
(2) Import samples/tasks/clustering-and-basic-failover.xml file
(3) Delete Task6 and Task7, we won't need them.
(3) Wait a few seconds

The tasks should be (in any way) distributed on Node1 and Node2.

2Capabilities defined

(1) Set Required capability for Task1 and Task2 to Node2 (see Node-sticky tasks HOWTO)
(2) Wait ca. 30 seconds

These tasks should run on Node2 only.
3Missing capability(1) Set Required capability for Task1 to some non-existing value, like abcdef
(2) Wait ca. 30 seconds
Task1 should be Runnable but not Running. There's no node it could run on.

3

Stopping tomcat (Ctrl+C)

(1) Set Required capability for Task1..5 to Node2.
(2)Wait until all these tasks run on Node2.
(3) Stop Node2, by shutting down its tomcat (CTRL + C). Try to stop Node2 while one or more tasks are executing on it.
(4) Wait a few seconds.

Tasks 1..5 should not run. In the idm.log file for Node1 there must not be any trace of running these tasks!

Node2's status should be "Stopped" and then "Turned off".

4

Resuming tasks on correct node

(1) Start Node2 back
(2) Wait a few seconds

Node2's status should be "Running". Tasks 1..5 should be executing on Node2. In the idm.log file for Node1 still must not be any trace of running these tasks!

5

Killing tomcat

(1) Make sure that required capability for Task1..5 is still set to Node2.
(2)Wait until all these tasks run on Node2.
(3) Stop Node2, by stopping the tomcat abruptly via OS (kill, process deletion). Try to stop Node2 while one or more tasks are executing on it.
(4) Wait a few seconds.

Again, make sure that in the idm.log file for Node1 there is no trace of running these tasks!

6

Resuming tasks on correct node

(1) Start Node2 back
(2) Wait a few seconds

Node2's status should be "Running". Tasks 1..5 should be executing on Node2. In the idm.log file for Node1 still must not be any trace of running these tasks!

Import From File And Resource Tests

...