1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Don't treat run() as a parallel task

Fixes a regression from #457
This commit is contained in:
Eric Lindvall 2016-01-07 18:04:34 -08:00
parent c0f5be4055
commit b73f72b924
2 changed files with 19 additions and 1 deletions

View file

@ -320,7 +320,7 @@ module Capistrano
branches += server_branches branches += server_branches
end end
branches branches
end end.compact.uniq
end end
end end

View file

@ -243,6 +243,12 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
def test_parallel_command_execution_with_matching_servers def test_parallel_command_execution_with_matching_servers
@config.expects(:execute_on_servers) @config.expects(:execute_on_servers)
logger = mock('logger')
logger.stubs(:debug).with("executing multiple commands in parallel").once
logger.stubs(:trace).twice
@config.stubs(:logger).returns(logger)
assert_block("should not raise Argument error") do assert_block("should not raise Argument error") do
begin begin
@config.servers = [:app, :db] @config.servers = [:app, :db]
@ -258,6 +264,18 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
end end
end end
def test_run_only_logs_once
@config.servers = [:app, :db]
logger = mock('logger')
logger.stubs(:debug).with("executing \"ls\"")
@config.stubs(:logger).returns(logger)
@config.expects(:execute_on_servers)
@config.run("ls")
end
private private
def make_config def make_config