summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2015-10-23 01:23:53 +0300
committerMichael Klishin <mklishin@pivotal.io>2015-10-23 01:23:53 +0300
commitad461b30e9c0104277dff7ec937354d1fc1e64d5 (patch)
tree7bd77f399c15b91b2cb319d8ec9dae10cd40ef6d /test
parent2bc39429a943957d64b29a1c7a70a8e787e2cd18 (diff)
parent1474424ed873b756438bc6a1a3e0fcebb8e9c958 (diff)
downloadrabbitmq-server-git-ad461b30e9c0104277dff7ec937354d1fc1e64d5.tar.gz
Merge branch 'stable'
Diffstat (limited to 'test')
-rw-r--r--test/src/rabbit_tests.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/src/rabbit_tests.erl b/test/src/rabbit_tests.erl
index e7df47a3d8..44bf3da5f2 100644
--- a/test/src/rabbit_tests.erl
+++ b/test/src/rabbit_tests.erl
@@ -91,6 +91,7 @@ all_tests0() ->
passed = test_configurable_server_properties(),
passed = vm_memory_monitor_tests:all_tests(),
passed = credit_flow_test:test_credit_flow_settings(),
+ passed = test_memory_high_watermark(),
passed = on_disk_store_tunable_parameter_validation_test:test_msg_store_parameter_validation(),
passed = password_hashing_tests:test_password_hashing(),
passed = credit_flow_test:test_credit_flow_settings(),
@@ -3218,3 +3219,14 @@ test_configurable_server_properties() ->
nop(_) -> ok.
nop(_, _) -> ok.
+
+test_memory_high_watermark() ->
+ %% set vm memory high watermark
+ HWM = vm_memory_monitor:get_vm_memory_high_watermark(),
+ %% this will trigger an alarm (memory unit is MB)
+ ok = control_action(set_vm_memory_high_watermark, ["absolute", "2"]),
+ [{{resource_limit,memory,_},[]}] = rabbit_alarm:get_alarms(),
+ %% reset
+ ok = control_action(set_vm_memory_high_watermark, [float_to_list(HWM)]),
+
+ passed.