aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_alert_changed.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-22 12:01:17 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-22 12:01:17 +0100
commitda9ef07cfa2dfd26d1e8efdce5598a7ac7806271 (patch)
treef574227852d475ef772a86366eb8a3c50da1ab1a /test/tc_mauve_alert_changed.rb
parent8268305f172376b92957096a2154efe34e275b6a (diff)
* Race condition fixed (fixes #1861).
* Reminders get sent at start of during period (fixes #1821)
Diffstat (limited to 'test/tc_mauve_alert_changed.rb')
-rw-r--r--test/tc_mauve_alert_changed.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/tc_mauve_alert_changed.rb b/test/tc_mauve_alert_changed.rb
index 0e57120..3c43a2a 100644
--- a/test/tc_mauve_alert_changed.rb
+++ b/test/tc_mauve_alert_changed.rb
@@ -7,7 +7,7 @@ require 'mauve/configuration_builder'
require 'mauve/configuration_builders'
require 'th_mauve'
-class TcMauveAlertChanged < Mauve::UnitTest
+class TcMauveAlertChanged < Mauve::UnitTest
include Mauve
def setup
@@ -51,13 +51,13 @@ EOF
notifications = 1
mins = 0
- 121.times do
+ 11.times do
mins += 1
assert_equal(notifications, Server.instance.notification_buffer.length)
assert_equal(reminders, AlertChanged.count)
- Timecop.freeze(Time.now+1.minutes)
+ Timecop.freeze(Time.now+1.minute)
if mins % 5 == 0
notifications += 1
@@ -67,10 +67,10 @@ EOF
AlertChanged.all.each{|ac| ac.poll}
end
- # OK now clear the alert, send one notification and set an alert_changed.
+ # OK now clear the alert, send one notification and but not an alert_changed.
alert.clear!
notifications += 1
- reminders += 1
+
assert_equal(notifications, Server.instance.notification_buffer.length)
assert_equal(reminders, AlertChanged.count)