diff --git a/src/test/clmctest/alerts/alerts_test_config.yaml b/src/test/clmctest/alerts/alerts_test_config.yaml index c2e9332e7a5783966223f3debd9bf7418866491c..c2600f0e462a41e6a98782b237bdb829d2eadb3a 100644 --- a/src/test/clmctest/alerts/alerts_test_config.yaml +++ b/src/test/clmctest/alerts/alerts_test_config.yaml @@ -31,18 +31,18 @@ topology_template: action: implementation: - http://172.40.231.200:9999/ - high_cpu_usage: - description: This event triggers when the cpu system usage is too high. + increase_in_running_processes: + description: This event triggers when the max number of running processes increases. event_type: threshold - metric: cpu.usage_system + metric: processes.running condition: - threshold: 10 - granularity: 10 - aggregation_method: mean + threshold: 1 + granularity: 12 + aggregation_method: max resource_type: flame_location: DC1 flame_sfp: nginx - comparison_operator: lte + comparison_operator: gte action: implementation: - http://172.40.231.200:9999/ diff --git a/src/test/clmctest/alerts/conftest.py b/src/test/clmctest/alerts/conftest.py index 73a65b726d0f6af32e18f71d21b90d30e4189b77..02d004df047f89dbbe44c2fd3e3d32830a14b1ea 100644 --- a/src/test/clmctest/alerts/conftest.py +++ b/src/test/clmctest/alerts/conftest.py @@ -54,7 +54,7 @@ def rspec_config(): return data_loaded -@fixture(autouse=True, scope="module") +@fixture(scope="module") def set_up_tear_down_fixture(rspec_config): """ Set up/tear down fixture for the alerts integration test. diff --git a/src/test/clmctest/alerts/resources_test_config.yaml b/src/test/clmctest/alerts/resources_test_config.yaml index 45591f166d254eab8840a276a3897d6210f0cf1b..061c227317c1e4f6818e34b173b1f42eb8eb2907 100644 --- a/src/test/clmctest/alerts/resources_test_config.yaml +++ b/src/test/clmctest/alerts/resources_test_config.yaml @@ -85,7 +85,7 @@ topology_template: Bristol: eu.ict-flame.sfe.state.lifecycle.connected tigger_b: condition: - constraint: clmc::high_cpu_usage + constraint: clmc::increase_in_running_processes period: 600 # integer required, unit: seconds action: frontend: diff --git a/src/test/clmctest/alerts/test_alerts.py b/src/test/clmctest/alerts/test_alerts.py index e5535f459f117cbcd5d2b7cc5effc522c6c07360..59fefb48eb0f7f5e3a88f13c5ba4f06943924f51 100644 --- a/src/test/clmctest/alerts/test_alerts.py +++ b/src/test/clmctest/alerts/test_alerts.py @@ -35,7 +35,7 @@ NGINX_PORT = 80 class TestAlerts(object): - def test_alert_triggers(self, rspec_config): + def test_alert_triggers(self, rspec_config, set_up_tear_down_fixture): """ Test is implemented using the following steps: * Send clmc service a TOSCA alert spec. file