beetle 0.3.0.rc.9 → 0.3.0.rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/RELEASE_NOTES.rdoc CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  == Version 0.3.0
4
4
 
5
+ * redis master file contents now correctly reflects the state of the running configuration server
5
6
  * allow accelerating master switch via POST to redis configuration server
6
7
  * embedded http server into the redis configuration server (port 8080)
7
8
  * fixed a problem with redis shutdown command
@@ -15,6 +15,7 @@ Feature: Redis auto failover
15
15
  And the retry timeout for the redis master check is reached
16
16
  Then a system notification for "redis-1" not being available should be sent
17
17
  And the role of redis server "redis-2" should be "master"
18
+ And the redis master file of the redis configuration server should contain "redis-2"
18
19
  And the redis master of "rc-client-1" should be "redis-2"
19
20
  And the redis master of "rc-client-2" should be "redis-2"
20
21
  And the redis master of the beetle handler should be "redis-2"
@@ -95,6 +95,12 @@ Then /^the redis master of "([^\"]*)" should be "([^\"]*)"$/ do |redis_configura
95
95
  assert master, "#{redis_name} is not master of #{redis_configuration_client_name}, master file content: #{server_info.inspect}"
96
96
  end
97
97
 
98
+ Then /^the redis master file of the redis configuration server should contain "([^"]*)"$/ do |redis_name| # " for emacs :(
99
+ master_file = TestDaemons::RedisConfigurationServer.redis_master_file
100
+ file_contents = File.read(master_file).chomp
101
+ assert_equal TestDaemons::Redis[redis_name].ip_with_port, file_contents
102
+ end
103
+
98
104
  Then /^the redis master of "([^\"]*)" should be undefined$/ do |redis_configuration_client_name|
99
105
  master_file = redis_master_file(redis_configuration_client_name)
100
106
  empty = false
@@ -279,6 +279,7 @@ module Beetle
279
279
  beetle.publish(:system_notification, {"message" => msg}.to_json)
280
280
 
281
281
  new_master.master!
282
+ write_redis_master_file(new_master.server)
282
283
  @current_master = new_master
283
284
  else
284
285
  msg = "Redis master could not be switched, no slave available to become new master, promoting old master"
@@ -1,3 +1,3 @@
1
1
  module Beetle
2
- VERSION = "0.3.0.rc.9"
2
+ VERSION = "0.3.0.rc.10"
3
3
  end
@@ -147,6 +147,7 @@ module Beetle
147
147
  new_master = stub(:master! => nil, :server => "jo:6379")
148
148
  @server.beetle.expects(:publish).with(:system_notification, anything)
149
149
  @server.expects(:determine_new_master).returns(new_master)
150
+ @server.expects(:write_redis_master_file).with(new_master.server)
150
151
  @server.send :switch_master
151
152
  assert_equal new_master, @server.current_master
152
153
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beetle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424055
4
+ hash: 15424049
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 0
10
10
  - rc
11
- - 9
12
- version: 0.3.0.rc.9
11
+ - 10
12
+ version: 0.3.0.rc.10
13
13
  platform: ruby
14
14
  authors:
15
15
  - Stefan Kaes