Skip to content
Browse files

Remove trailing whitespace

  • Loading branch information...
1 parent 43e68c2 commit 75a27674179c6bbd61fd00e336ebf2a798609cf7 @tmm1 tmm1 committed Dec 7, 2011
Showing with 14 additions and 14 deletions.
  1. +1 −1 bin/ernie
  2. +13 −13 test/test_ernie_server.rb
View
2 bin/ernie
@@ -123,7 +123,7 @@ else
-ernie_server_app config '"#{config}"' \
-ernie_server_app log_level #{log_level} \
-run ernie_server_app boot \
- #{erl_options}}.squeeze(' ')
+ #{erl_options}}.squeeze(' ')
puts cmd
STDOUT.flush
exec(cmd)
View
26 test/test_ernie_server.rb
@@ -16,7 +16,7 @@ def setup
exit
end
end
-
+
def teardown
`rm test/sample/intTest.beam`
end
@@ -51,12 +51,12 @@ def teardown
assert_equal 8 * 1024 * 1024, svc.call.ext.big(8 * 1024 * 1024).size
assert_equal 8 * 1024 * 1024, svc.call.intTest.big(8 * 1024 * 1024).size
end
-
+
should "not block on internal modules" do
time = Time.now
svc.call.intTest.sleep(1000)
assert(Time.now >= time + 1)
-
+
time = Time.now
svc.cast.intTest.sleep(1000)
svc.cast.intTest.sleep(1000)
@@ -116,15 +116,15 @@ def teardown
shutdown_server
end
end
-
+
context "Two Ernie Servers" do
setup do
start_servers(2)
@servers.each do |svc|
svc.cast.intTest.connect_nodes
end
end
-
+
context "call" do
should "handle zeronary" do
@@ -174,29 +174,29 @@ def teardown
shutdown_servers(2)
end
end
-
+
protected
-
+
def svc
@servers[rand(@servers.size-1)]
end
-
+
def start_server
start_servers(1)
end
-
+
def shutdown_server
shutdown_servers(1)
end
-
+
def start_servers(n = 1)
n.times do
`#{ERNIE_ROOT}/bin/ernie -c #{ERNIE_ROOT}/test/sample/sample.cfg \
-P /tmp/ernie#{@servers.size}.pid \
-p #{PORT + @servers.size} \
--name ernie#{@servers.size}@127.0.0.1 \
-d`
-
+
@servers << BERTRPC::Service.new('localhost', PORT + @servers.size)
loop do
begin
@@ -208,7 +208,7 @@ def start_servers(n = 1)
end
end
end
-
+
def shutdown_servers(n = nil)
start = @servers.size - 1
last = start - (n || start)
@@ -217,5 +217,5 @@ def shutdown_servers(n = nil)
`kill -9 #{pid}`
end
end
-
+
end

0 comments on commit 75a2767

Please sign in to comment.
Something went wrong with that request. Please try again.