summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test/resources
diff options
context:
space:
mode:
authordaniel <dc443y@att.com>2017-10-04 10:09:37 -0500
committerdaniel <dc443y@att.com>2017-10-05 15:41:22 -0500
commit1c2dcbb8e38fe1e3f3271dade73a7b3a7c3a64b5 (patch)
tree7c4bc5438a3bf61d28cfdf3b18a9d7c4c233f0d1 /controlloop/templates/template.demo/src/test/resources
parent9f789fa6c2d9d58685c1e20eaf3216f45deee5e7 (diff)
Fix JUnit Race Conditions
This fix now implements the observer pattern for the PolicyEngineJUnitImpl so that the test cases can be notified when an event is available to be pulled. This eliminates the need to sleep the thread for some arbitrary time to let the rules process events. Issue-ID: POLICY-291 Change-Id: I884c959c20b95a1b58f357602099d8a01c8d2e3c Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/templates/template.demo/src/test/resources')
-rw-r--r--controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml4
-rw-r--r--controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_VFC.yaml4
-rw-r--r--controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vCPE.yaml4
-rw-r--r--controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vFW.yaml4
4 files changed, 8 insertions, 8 deletions
diff --git a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
index d3ae91650..d4b040396 100644
--- a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
+++ b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_SO-test.yaml
@@ -6,7 +6,7 @@ controlLoop:
serviceInvariantUUID: dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f
serviceUUID: 2eea06c6-e1d3-4c3a-b9c4-478c506eeedf
trigger_policy: unique-policy-id-1-scale-up
- timeout: 1200
+ timeout: 20
policies:
- id: unique-policy-id-1-scale-up
@@ -17,7 +17,7 @@ policies:
target:
type: VNF
retry: 0
- timeout: 1200
+ timeout: 10
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout
diff --git a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_VFC.yaml b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_VFC.yaml
index 00cced484..336d83fc3 100644
--- a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_VFC.yaml
+++ b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_VFC.yaml
@@ -3,7 +3,7 @@ controlLoop:
controlLoopName: ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b
trigger_policy: unique-policy-id-1-restart
- timeout: 3600
+ timeout: 20
policies:
- id: unique-policy-id-1-restart
@@ -14,7 +14,7 @@ policies:
target:
type: VM
retry: 3
- timeout: 1200
+ timeout: 10
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout
diff --git a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vCPE.yaml b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vCPE.yaml
index de2ece4ed..65a3a4f8b 100644
--- a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vCPE.yaml
+++ b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vCPE.yaml
@@ -2,7 +2,7 @@ controlLoop:
version: 2.0.0
controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
trigger_policy: unique-policy-id-1-restart
- timeout: 3600
+ timeout: 20
abatement: true
policies:
@@ -14,7 +14,7 @@ policies:
target:
type: VM
retry: 3
- timeout: 1200
+ timeout: 10
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout
diff --git a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vFW.yaml b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vFW.yaml
index d15c46126..4a92a24f7 100644
--- a/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vFW.yaml
+++ b/controlloop/templates/template.demo/src/test/resources/yaml/policy_ControlLoop_vFW.yaml
@@ -6,7 +6,7 @@ controlLoop:
serviceUUID: 0f40bba5-986e-4b3c-803f-ddd1b7b25f24
serviceName: 57e66ea7-0ed6-45c7-970f
trigger_policy: unique-policy-id-1-modifyConfig
- timeout: 1200
+ timeout: 20
abatement: true
policies:
@@ -19,7 +19,7 @@ policies:
resourceID: Eace933104d443b496b8.nodes.heat.vpg
type: VNF
retry: 0
- timeout: 300
+ timeout: 10
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout