diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-11-03 16:48:52 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-11-03 16:48:52 +0000 |
commit | 4d6b2e47ac5b135097bc8eb7b2b1ebae65668647 (patch) | |
tree | 8f6174fafcc7c356087fc209991b89dea0c3295d /test/tc_mauve_alert.rb | |
parent | f93f0948e028c33694cf7f90c7d5918cbf27971c (diff) | |
parent | 6f689f2fa872f507527c10fa9b44cdbb96ebd3e0 (diff) |
Merge
Diffstat (limited to 'test/tc_mauve_alert.rb')
-rw-r--r-- | test/tc_mauve_alert.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/tc_mauve_alert.rb b/test/tc_mauve_alert.rb index a9aef5f..2b8af6f 100644 --- a/test/tc_mauve_alert.rb +++ b/test/tc_mauve_alert.rb @@ -272,4 +272,25 @@ EOF # end + def test_heartbeats_during_clock_change + + updates = YAML.load_file(File.join(File.dirname(__FILE__),"bst_to_gmt.yaml")) + + Timecop.freeze(updates.first[1]-20.minutes) + Configuration.current = ConfigurationBuilder.parse(@test_config) + Server.instance.setup + assert_equal(Time.now, Server.instance.started_at) + + updates.each do |update, received_at, source_ip| + Timecop.freeze(received_at) + Alert.receive_update(update, received_at, source_ip) + alert = Alert.first + assert(alert.cleared?) + alert.poll + assert(alert.cleared?) + assert(0, Server.instance.notification_buffer.length) + end + + end + end |