roma 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +21 -0
- data/Gemfile.lock +47 -0
- data/bin/check_tc_flag +39 -0
- data/bin/roma-adm +43 -0
- data/bin/ssroute +0 -3
- data/lib/roma/async_process.rb +203 -208
- data/lib/roma/command/sys_command_receiver.rb +52 -10
- data/lib/roma/config.rb +3 -0
- data/lib/roma/event/handler.rb +11 -4
- data/lib/roma/event/jaro_winkler.rb +23 -0
- data/lib/roma/event/levenshtein.rb +23 -0
- data/lib/roma/plugin/plugin_cmd_aliases.rb +1 -32
- data/lib/roma/romad.rb +23 -0
- data/lib/roma/routing/cb_rttable.rb +2 -0
- data/lib/roma/routing/random_partitioner.rb +43 -36
- data/lib/roma/routing/rttable.rb +5 -3
- data/lib/roma/stats.rb +4 -1
- data/lib/roma/tools/check_tc_flag.rb +25 -0
- data/lib/roma/tools/cpdb.rb +3 -2
- data/lib/roma/tools/mkconfig.rb +22 -13
- data/lib/roma/tools/roma-adm.rb +82 -0
- data/lib/roma/version.rb +1 -1
- data/test/config4mhash.rb +2 -0
- data/test/config4storage_error.rb +2 -0
- data/test/config4test.rb +2 -0
- data/test/cpdbtest/config4cpdb_base.rb +67 -0
- data/test/cpdbtest/config4cpdb_dbm.rb +9 -0
- data/test/cpdbtest/config4cpdb_groonga.rb +9 -0
- data/test/cpdbtest/config4cpdb_rh.rb +9 -0
- data/test/cpdbtest/config4cpdb_sqlite3.rb +9 -0
- data/test/cpdbtest/config4cpdb_tc.rb +9 -0
- data/test/cpdbtest/config4cpdb_tcmem.rb +9 -0
- data/test/roma-test-utils.rb +140 -40
- data/test/t_cpdata.rb +76 -80
- data/test/t_cpdb.rb +95 -0
- data/test/t_logshift.rb +86 -0
- data/test/t_mhash.rb +56 -54
- data/test/t_routing_logic.rb +121 -0
- data/test/t_writebehind.rb +202 -207
- metadata +25 -8
- data/bin/tc_data_restore.rb +0 -123
data/test/t_cpdata.rb
CHANGED
@@ -3,53 +3,51 @@
|
|
3
3
|
require 'roma/client/rclient'
|
4
4
|
require 'roma/messaging/con_pool'
|
5
5
|
|
6
|
+
TCP_SERVER_PORT = 11_219
|
6
7
|
$dat = {}
|
7
8
|
|
8
9
|
def receive_command_server
|
9
|
-
$gs = TCPServer.open(
|
10
|
-
|
11
|
-
Thread.new($gs.accept)
|
10
|
+
$gs = TCPServer.open(TCP_SERVER_PORT)
|
11
|
+
loop do
|
12
|
+
Thread.new($gs.accept) do |s|
|
12
13
|
begin
|
13
|
-
|
14
|
-
res
|
15
|
-
|
16
|
-
if res==nil
|
17
|
-
s.close
|
18
|
-
elsif res.start_with?("pushv")
|
19
|
-
ss = res.split(" ")
|
14
|
+
while res = s.gets
|
15
|
+
if res.start_with?('pushv')
|
16
|
+
ss = res.split(' ')
|
20
17
|
s.write("READY\r\n")
|
21
18
|
len = s.gets.chomp
|
22
19
|
$dat[ss[2].to_i] = receive_dump(s, len.to_i)
|
23
20
|
s.write("STORED\r\n")
|
24
|
-
elsif res.start_with?(
|
25
|
-
ss = res.split(
|
21
|
+
elsif res.start_with?('spushv')
|
22
|
+
ss = res.split(' ')
|
26
23
|
s.write("READY\r\n")
|
27
24
|
$dat[ss[2].to_i] = receive_stream_dump(s)
|
28
25
|
s.write("STORED\r\n")
|
29
|
-
elsif res.start_with?(
|
26
|
+
elsif res.start_with?('whoami')
|
30
27
|
s.write("ROMA\r\n")
|
31
|
-
elsif res.start_with?(
|
28
|
+
elsif res.start_with?('rbalse')
|
32
29
|
s.write("BYE\r\n")
|
33
|
-
s.close
|
34
30
|
break
|
35
31
|
else
|
36
32
|
s.write("STORED\r\n")
|
37
33
|
end
|
38
|
-
|
39
|
-
rescue =>e
|
34
|
+
end
|
35
|
+
rescue => e
|
40
36
|
p e
|
41
|
-
p
|
37
|
+
p $ERROR_POSITION
|
38
|
+
ensure
|
39
|
+
s.close if s
|
42
40
|
end
|
43
|
-
|
41
|
+
end
|
44
42
|
end
|
45
|
-
rescue =>e
|
43
|
+
rescue => e
|
46
44
|
p e
|
47
45
|
end
|
48
46
|
|
49
47
|
def receive_stream_dump(sok)
|
50
48
|
ret = {}
|
51
49
|
v = nil
|
52
|
-
loop
|
50
|
+
loop do
|
53
51
|
context_bin = sok.read(20)
|
54
52
|
vn, last, clk, expt, klen = context_bin.unpack('NNNNN')
|
55
53
|
|
@@ -61,15 +59,15 @@ def receive_stream_dump(sok)
|
|
61
59
|
v = sok.read(vlen)
|
62
60
|
end
|
63
61
|
ret[k] = [vn, last, clk, expt, v].pack('NNNNa*')
|
64
|
-
|
62
|
+
end
|
65
63
|
ret
|
66
|
-
rescue =>e
|
64
|
+
rescue => e
|
67
65
|
p e
|
68
66
|
end
|
69
67
|
|
70
68
|
def receive_dump(sok, len)
|
71
69
|
dmp = ''
|
72
|
-
while(dmp.length != len.to_i)
|
70
|
+
while (dmp.length != len.to_i)
|
73
71
|
dmp = dmp + sok.read(len.to_i - dmp.length)
|
74
72
|
end
|
75
73
|
sok.read(2)
|
@@ -78,7 +76,7 @@ def receive_dump(sok, len)
|
|
78
76
|
else
|
79
77
|
return nil
|
80
78
|
end
|
81
|
-
rescue =>e
|
79
|
+
rescue => e
|
82
80
|
false
|
83
81
|
end
|
84
82
|
|
@@ -87,37 +85,37 @@ class CopyDataTest < Test::Unit::TestCase
|
|
87
85
|
include RomaTestUtils
|
88
86
|
|
89
87
|
def setup
|
90
|
-
@th = Thread.new{ receive_command_server }
|
88
|
+
@th = Thread.new { receive_command_server }
|
91
89
|
start_roma
|
92
|
-
@rc=Roma::Client::RomaClient.new(
|
90
|
+
@rc = Roma::Client::RomaClient.new(%w(localhost_11211 localhost_11212))
|
93
91
|
end
|
94
92
|
|
95
93
|
def teardown
|
96
94
|
stop_roma
|
97
95
|
@th.kill
|
98
96
|
$gs.close
|
99
|
-
Roma::Messaging::ConPool
|
97
|
+
Roma::Messaging::ConPool.instance.close_all
|
100
98
|
end
|
101
99
|
|
102
100
|
def test_spushv
|
103
101
|
# key wihch's vn = 0
|
104
102
|
keys = []
|
105
103
|
n = 1000
|
106
|
-
n.times
|
104
|
+
n.times do |i|
|
107
105
|
d = Digest::SHA1.hexdigest(i.to_s).hex % @rc.rttable.hbits
|
108
106
|
vn = @rc.rttable.get_vnode_id(d)
|
109
107
|
if vn == 0
|
110
108
|
keys << i.to_s
|
111
109
|
end
|
112
|
-
|
110
|
+
end
|
113
111
|
nid = @rc.rttable.search_nodes(0)
|
114
112
|
|
115
113
|
push_a_vnode_stream('roma', 0, nid[0], keys)
|
116
114
|
|
117
|
-
keys.each
|
118
|
-
assert_equal(
|
119
|
-
# puts "#{k} #{@rc.get(k)}"
|
120
|
-
|
115
|
+
keys.each do |k|
|
116
|
+
assert_equal("#{k}-stream", @rc.get(k, true))
|
117
|
+
# puts "#{k} #{@rc.get(k)}"
|
118
|
+
end
|
121
119
|
end
|
122
120
|
|
123
121
|
def push_a_vnode_stream(hname, vn, nid, keys)
|
@@ -130,54 +128,53 @@ class CopyDataTest < Test::Unit::TestCase
|
|
130
128
|
return res.chomp
|
131
129
|
end
|
132
130
|
|
133
|
-
keys.each
|
134
|
-
v = k +
|
131
|
+
keys.each do |k|
|
132
|
+
v = k + '-stream'
|
135
133
|
data = [vn, Time.now.to_i, 1, 0x7fffffff, k.length, k, v.length, v].pack("NNNNNa#{k.length}Na#{v.length}")
|
136
134
|
con.write(data)
|
137
|
-
|
138
|
-
con.write("\0"*20) # end of steram
|
135
|
+
end
|
136
|
+
con.write("\0" * 20) # end of steram
|
139
137
|
|
140
138
|
res = con.gets # STORED\r\n or error string
|
141
|
-
Roma::Messaging::ConPool.instance.return_connection(nid,con)
|
139
|
+
Roma::Messaging::ConPool.instance.return_connection(nid, con)
|
142
140
|
res.chomp! if res
|
143
141
|
res
|
144
|
-
rescue =>e
|
142
|
+
rescue => e
|
145
143
|
"#{e}"
|
146
144
|
end
|
147
145
|
private :push_a_vnode_stream
|
148
146
|
|
149
|
-
|
150
147
|
def test_reqpushv
|
151
148
|
make_dummy(1000)
|
152
149
|
|
153
|
-
dat=[]
|
154
|
-
dat[0] = reqpushv('roma',0)
|
155
|
-
assert_not_nil(
|
156
|
-
dat[0] = reqpushv('roma',0)
|
157
|
-
assert_not_nil(
|
158
|
-
|
159
|
-
dat[1] = reqpushv('roma',
|
160
|
-
assert_not_nil(
|
161
|
-
dat[2] = reqpushv('roma',
|
162
|
-
assert_not_nil(
|
163
|
-
dat[3] = reqpushv('roma',
|
164
|
-
assert_not_nil(
|
165
|
-
dat[4] = reqpushv('roma',
|
166
|
-
assert_not_nil(
|
167
|
-
dat[5] = reqpushv('roma',
|
168
|
-
assert_not_nil(
|
169
|
-
dat[6] = reqpushv('roma',
|
170
|
-
assert_not_nil(
|
171
|
-
dat[7] = reqpushv('roma',
|
172
|
-
assert_not_nil(
|
150
|
+
dat = []
|
151
|
+
dat[0] = reqpushv('roma', 0)
|
152
|
+
assert_not_nil(dat[0])
|
153
|
+
dat[0] = reqpushv('roma', 0)
|
154
|
+
assert_not_nil(dat[0]) # confirming twice access to same node
|
155
|
+
|
156
|
+
dat[1] = reqpushv('roma', 536_870_912)
|
157
|
+
assert_not_nil(dat[1])
|
158
|
+
dat[2] = reqpushv('roma', 1_073_741_824)
|
159
|
+
assert_not_nil(dat[2])
|
160
|
+
dat[3] = reqpushv('roma', 1_610_612_736)
|
161
|
+
assert_not_nil(dat[3])
|
162
|
+
dat[4] = reqpushv('roma', 2_147_483_648)
|
163
|
+
assert_not_nil(dat[4])
|
164
|
+
dat[5] = reqpushv('roma', 2_684_354_560)
|
165
|
+
assert_not_nil(dat[5])
|
166
|
+
dat[6] = reqpushv('roma', 3_221_225_472, true)
|
167
|
+
assert_not_nil(dat[6])
|
168
|
+
dat[7] = reqpushv('roma', 3_758_096_384, true)
|
169
|
+
assert_not_nil(dat[7])
|
173
170
|
|
174
171
|
a = 0
|
175
|
-
dat.each{|v| a+=v.length }
|
176
|
-
assert_equal(
|
172
|
+
dat.each { |v| a += v.length }
|
173
|
+
assert_equal(1000, a)
|
177
174
|
end
|
178
175
|
|
179
176
|
def wait(vn)
|
180
|
-
while $dat.key?(vn)
|
177
|
+
while $dat.key?(vn)
|
181
178
|
sleep 0.01
|
182
179
|
end
|
183
180
|
$dat[vn]
|
@@ -185,38 +182,38 @@ class CopyDataTest < Test::Unit::TestCase
|
|
185
182
|
|
186
183
|
# set dummy data of n count
|
187
184
|
def make_dummy(n)
|
188
|
-
n.times
|
189
|
-
assert(
|
190
|
-
|
185
|
+
n.times do |i|
|
186
|
+
assert(@rc.set(i.to_s, i.to_s) == 'STORED')
|
187
|
+
end
|
191
188
|
end
|
192
189
|
|
193
|
-
def reqpushv(
|
190
|
+
def reqpushv(_hname, vn, is_primary = false)
|
194
191
|
$dat.delete(vn)
|
195
|
-
con = Roma::Messaging::ConPool.instance.get_connection(
|
192
|
+
con = Roma::Messaging::ConPool.instance.get_connection('localhost_11211')
|
196
193
|
res = nil
|
197
|
-
10.times
|
198
|
-
con.write("reqpushv #{vn}
|
194
|
+
10.times do
|
195
|
+
con.write("reqpushv #{vn} localhost_#{TCP_SERVER_PORT} #{is_primary}\r\n")
|
199
196
|
res = con.gets
|
200
197
|
break if res == "PUSHED\r\n"
|
201
198
|
sleep 0.5
|
202
|
-
|
203
|
-
assert_equal(
|
199
|
+
end
|
200
|
+
assert_equal("PUSHED\r\n", res)
|
204
201
|
con.close
|
205
202
|
|
206
|
-
until $dat.key?(vn)
|
203
|
+
until $dat.key?(vn)
|
207
204
|
Thread.pass
|
208
205
|
sleep 0.01
|
209
206
|
end
|
210
207
|
$dat[vn]
|
211
|
-
rescue =>e
|
208
|
+
rescue => e
|
212
209
|
p e
|
213
|
-
p
|
210
|
+
p $ERROR_POSITION
|
214
211
|
return nil
|
215
212
|
end
|
216
213
|
|
217
214
|
def receive_dump(sok, len)
|
218
215
|
dmp = ''
|
219
|
-
while(dmp.length != len.to_i)
|
216
|
+
while (dmp.length != len.to_i)
|
220
217
|
dmp = dmp + sok.read(len.to_i - dmp.length)
|
221
218
|
end
|
222
219
|
sok.read(2)
|
@@ -225,9 +222,8 @@ class CopyDataTest < Test::Unit::TestCase
|
|
225
222
|
else
|
226
223
|
return nil
|
227
224
|
end
|
228
|
-
rescue =>e
|
229
|
-
@log.error("#{e}\n#{
|
225
|
+
rescue => e
|
226
|
+
@log.error("#{e}\n#{$ERROR_POSITION}")
|
230
227
|
false
|
231
228
|
end
|
232
|
-
|
233
229
|
end
|
data/test/t_cpdb.rb
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'roma/client/rclient'
|
3
|
+
require 'roma/messaging/con_pool'
|
4
|
+
require 'roma/config'
|
5
|
+
require 'pathname'
|
6
|
+
|
7
|
+
class CpdbBaseTest < Test::Unit::TestCase
|
8
|
+
include RomaTestUtils
|
9
|
+
|
10
|
+
def teardown
|
11
|
+
stop_roma
|
12
|
+
rescue => e
|
13
|
+
puts "#{e} #{$@}"
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
# Groonga Storage Test
|
19
|
+
class GroongaTest < CpdbBaseTest
|
20
|
+
def setup
|
21
|
+
start_roma 'cpdbtest/config4cpdb_groonga.rb'
|
22
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_cpdb
|
26
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
27
|
+
assert_equal("ERROR:cpdb supports just TCStorage system, your storage type is GroongaStorage", value)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# RubyHash Storage Test
|
32
|
+
class RubyHashTest < CpdbBaseTest
|
33
|
+
def setup
|
34
|
+
start_roma 'cpdbtest/config4cpdb_rh.rb'
|
35
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
36
|
+
end
|
37
|
+
def test_cpdb
|
38
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
39
|
+
assert_equal("ERROR:cpdb supports just TCStorage system, your storage type is RubyHashStorage", value)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# TcTest Storage Test
|
44
|
+
class TcTest < CpdbBaseTest
|
45
|
+
def setup
|
46
|
+
start_roma 'cpdbtest/config4cpdb_tc.rb'
|
47
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
48
|
+
end
|
49
|
+
def test_cpdb
|
50
|
+
# Log Assertion
|
51
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
52
|
+
assert_match(/safecopy_flushed/, value)
|
53
|
+
assert_match(/finished/, value)
|
54
|
+
# File exist Assertion
|
55
|
+
valueFileList = `ls ./localhost_11211/roma/`.chomp
|
56
|
+
assert_match(/9.tc.([\d]+)/, valueFileList)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# TcMem Storage Test
|
61
|
+
class TcMemTest < CpdbBaseTest
|
62
|
+
def setup
|
63
|
+
start_roma 'cpdbtest/config4cpdb_tcmem.rb'
|
64
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
65
|
+
end
|
66
|
+
def test_cpdb
|
67
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
68
|
+
assert_equal("ERROR:cpdb supports just TCStorage system, your storage type is TCMemStorage" , value)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Dbm Storage Test
|
73
|
+
class DbmTest < CpdbBaseTest
|
74
|
+
def setup
|
75
|
+
start_roma 'cpdbtest/config4cpdb_dbm.rb'
|
76
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
77
|
+
end
|
78
|
+
def test_cpdb
|
79
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
80
|
+
assert_equal("ERROR:cpdb supports just TCStorage system, your storage type is DbmStorage", value)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Sqlite3 Storage Test
|
85
|
+
class Sqlite3Test < CpdbBaseTest
|
86
|
+
def setup
|
87
|
+
start_roma 'cpdbtest/config4cpdb_sqlite3.rb'
|
88
|
+
@rc=Roma::Client::RomaClient.new(["localhost_11211","localhost_11212"])
|
89
|
+
end
|
90
|
+
def test_cpdb
|
91
|
+
value = `#{bin_dir}/cpdb 11211`.chomp
|
92
|
+
assert_equal("ERROR:cpdb supports just TCStorage system, your storage type is SQLite3Storage", value)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
data/test/t_logshift.rb
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'socket'
|
4
|
+
require 'test/unit'
|
5
|
+
|
6
|
+
class LogShiftTest < Test::Unit::TestCase
|
7
|
+
include RomaTestUtils
|
8
|
+
|
9
|
+
def setup
|
10
|
+
start_roma
|
11
|
+
@sock_port_1 = TCPSocket.new("localhost", 11211)
|
12
|
+
@sock_port_2 = TCPSocket.new("localhost", 11212)
|
13
|
+
end
|
14
|
+
|
15
|
+
def teardown
|
16
|
+
@sock_port_1.close if @sock_port_1
|
17
|
+
@sock_port_2.close if @sock_port_2
|
18
|
+
stop_roma
|
19
|
+
rescue => e
|
20
|
+
puts "#{e} #{$@}"
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_log_shift_size
|
24
|
+
# get Current log_shift_size and log_shift_age of port 11211
|
25
|
+
@sock_port_1.write("stat log_shift_size\r\n")
|
26
|
+
old_log_shift_size = @sock_port_1.gets.chomp
|
27
|
+
|
28
|
+
# set & check new log_shift_size value on port 11211
|
29
|
+
@sock_port_1.write("set_log_shift_size 4096\r\n")
|
30
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
31
|
+
assert_equal('{"localhost_11212"=>"STORED", "localhost_11211"=>"STORED"}', @sock_port_1.gets.chomp)
|
32
|
+
@sock_port_1.write("stat log_shift_size\r\n")
|
33
|
+
puts "Old value was : #{old_log_shift_size} "
|
34
|
+
assert_equal( "stats.log_shift_size 4096" , @sock_port_1.gets.chomp);
|
35
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
36
|
+
|
37
|
+
# get & check new log_shift_size value on port 11212
|
38
|
+
@sock_port_2.write("stat log_shift_size\r\n")
|
39
|
+
assert_equal( "stats.log_shift_size 4096" , @sock_port_2.gets.chomp);
|
40
|
+
assert_equal("END", @sock_port_2.gets.chomp)
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_log_shift_age
|
45
|
+
# get Current log_shift_size and log_shift_age of port 11211
|
46
|
+
@sock_port_1.write("stat log_shift_age\r\n")
|
47
|
+
old_log_shift_age = @sock_port_1.gets.chomp
|
48
|
+
|
49
|
+
# set & check new log_shift_size value on port 11211
|
50
|
+
@sock_port_1.write("set_log_shift_age 7\r\n")
|
51
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
52
|
+
assert_equal('{"localhost_11212"=>"STORED", "localhost_11211"=>"STORED"}', @sock_port_1.gets.chomp)
|
53
|
+
@sock_port_1.write("stat log_shift_age\r\n")
|
54
|
+
puts "Old value was : #{old_log_shift_age} "
|
55
|
+
assert_equal( "stats.log_shift_age 7" , @sock_port_1.gets.chomp);
|
56
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
57
|
+
|
58
|
+
# get & check new log_shift_size value on port 11212
|
59
|
+
@sock_port_2.write("stat log_shift_age\r\n")
|
60
|
+
assert_equal( "stats.log_shift_age 7" , @sock_port_2.gets.chomp);
|
61
|
+
assert_equal("END", @sock_port_2.gets.chomp)
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_log_shift_age_min
|
66
|
+
# get Current log_shift_size and log_shift_age of port 11211
|
67
|
+
@sock_port_1.write("stat log_shift_age\r\n")
|
68
|
+
old_log_shift_age = @sock_port_1.gets.chomp
|
69
|
+
|
70
|
+
# set & check new log_shift_size value on port 11211
|
71
|
+
@sock_port_1.write("set_log_shift_age min\r\n")
|
72
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
73
|
+
assert_equal('{"localhost_11212"=>"STORED", "localhost_11211"=>"STORED"}', @sock_port_1.gets.chomp)
|
74
|
+
@sock_port_1.write("stat log_shift_age\r\n")
|
75
|
+
puts "Old value was : #{old_log_shift_age} "
|
76
|
+
assert_equal( "stats.log_shift_age min" , @sock_port_1.gets.chomp);
|
77
|
+
assert_equal("END", @sock_port_1.gets.chomp)
|
78
|
+
|
79
|
+
# get & check new log_shift_size value on port 11212
|
80
|
+
@sock_port_2.write("stat log_shift_age\r\n")
|
81
|
+
assert_equal( "stats.log_shift_age min" , @sock_port_2.gets.chomp);
|
82
|
+
assert_equal("END", @sock_port_2.gets.chomp)
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|