Skip to content

Commit

Permalink
updated our cucumber infrastructure for latest ep-engine changes
Browse files Browse the repository at this point in the history
Change-Id: Ief523cd621c4bf0fadf5ea47621aa4cc64393f1b
Reviewed-on: http://review.northscale.com:8080/360
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information
Aliaksey Kandratsenka authored and steveyen committed Jun 9, 2010
1 parent b74f115 commit fb4ae2c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
12 changes: 6 additions & 6 deletions features/support/util.rb
Expand Up @@ -45,7 +45,7 @@ def poll_for_condition(timeout = 10, fail_unless_ok = true)
if fail_unless_ok if fail_unless_ok
# puts "Timeout!!" # puts "Timeout!!"
# STDIN.gets # STDIN.gets
raise "Timeout hit while waiting for condition" raise "Timeout hit (#{timeout}) while waiting for condition"
end end
end end
ok ok
Expand Down Expand Up @@ -131,7 +131,7 @@ def node_resurrect(node_label)
# ------------------------------------------------------ # ------------------------------------------------------


def start_single_node(i) def start_single_node(i)
ports = [$base_cache_port + i*2, $base_cache_port + i*2 + 1, $base_api_port + i] ports = [$base_cache_port + i*2, $base_api_port + i]


wait_down_ports(ports, -1) wait_down_ports(ports, -1)


Expand Down Expand Up @@ -173,7 +173,7 @@ def start!
@cluster_ptys << rv @cluster_ptys << rv
end end


wait_up_ports(ports_to_wait) wait_up_ports(ports_to_wait, 30)
rescue Exception rescue Exception
stop! stop!
raise raise
Expand All @@ -183,7 +183,7 @@ def start!
sleep 5 sleep 5
end end


def wait_up_ports(ports_to_wait, timeout = 10) def wait_up_ports(ports_to_wait, timeout = 20)
poll_for_condition(timeout) do poll_for_condition(timeout) do
tmp = ports_to_wait tmp = ports_to_wait
ports_to_wait = [] ports_to_wait = []
Expand Down Expand Up @@ -267,7 +267,7 @@ def do_join(joiner, joinee)
def cluster_join(joiner, joinee) def cluster_join(joiner, joinee)
do_join(joiner, joinee) do_join(joiner, joinee)


poll_for_condition(10) do poll_for_condition(30) do
(node_info(joinee, joiner) rescue false) && (node_info(joiner, joinee) rescue false) (node_info(joinee, joiner) rescue false) && (node_info(joiner, joinee) rescue false)
end end


Expand Down Expand Up @@ -306,7 +306,7 @@ def cluster_eject(ejectee, ejecter = nil)


sleep 5 sleep 5


poll_for_condition(7, false) do poll_for_condition(20, false) do
ClusterConfig.active_cluster.node_labels.all? do |label| ClusterConfig.active_cluster.node_labels.all? do |label|
label == ejectee || !((node_info(label, ejectee) rescue true) || label == ejectee || !((node_info(label, ejectee) rescue true) ||
(node_info(ejectee, label) rescue true)) (node_info(ejectee, label) rescue true))
Expand Down
15 changes: 11 additions & 4 deletions test/gen_cluster_scripts.rb
Expand Up @@ -40,11 +40,12 @@
["-p", "#{(x * 2) + base_cache_port}", ["-p", "#{(x * 2) + base_cache_port}",
"-X", "./priv/engines/stdin_term_handler.so", "-X", "./priv/engines/stdin_term_handler.so",
"-E", "./priv/engines/bucket_engine.so", "-E", "./priv/engines/bucket_engine.so",
"-e", "admin=_admin;engine=./priv/engines/default_engine.so;default_bucket_name=default;auto_create=false", "-e", "admin=_admin;engine=./priv/engines/ep.so;default_bucket_name=default;auto_create=false"
"-B", "auto"], ],
[{env, [{"MEMCACHED_TOP_KEYS", "100"}, [{env, [{"MEMCACHED_TOP_KEYS", "100"},
{"ISASL_PWFILE", "./priv/isasl.pw"}, {"ISASL_PWFILE", "./priv/isasl.pw"}, % Also isasl path above.
{"ISASL_DB_CHECK_TIME", "1"}]}, {"ISASL_DB_CHECK_TIME", "1"}
]},
use_stdio, use_stdio,
stderr_to_stdout, stderr_to_stdout,
stream] stream]
Expand All @@ -53,6 +54,12 @@
end end


pools = <<END pools = <<END
{memcached, [{'_ver', {0, 0, 0}},
{port, #{base_cache_port}},
{admin_user, "_admin"},
{admin_pass, "_admin"},
{buckets, ["default"]}]}.
{pools, [ {pools, [
{'_ver', {0, 0, 0}}, {'_ver', {0, 0, 0}},
{"default", [ {"default", [
Expand Down

0 comments on commit fb4ae2c

Please sign in to comment.