Reset VM memory watermark during setup and tear down

Otherwise connections in other tests may end up being blocked,
which in turn means functions that close network connections time
out.
This commit is contained in:
Michael Klishin 2016-05-21 14:27:17 +03:00
parent 3fa66a5ab9
commit 05ee8884f9
1 changed files with 3 additions and 0 deletions

View File

@ -24,8 +24,11 @@ defmodule SetVmMemoryHighWatermarkCommandTest do
setup_all do
:net_kernel.start([:rabbitmqctl, :shortnames])
:net_kernel.connect_node(get_rabbit_hostname)
:vm_memory_monitor.set_vm_memory_high_watermark(0.4)
on_exit([], fn ->
:vm_memory_monitor.set_vm_memory_high_watermark(0.4)
:erlang.disconnect_node(get_rabbit_hostname)
:net_kernel.stop()
end)