Skip to content

Commit 827402b

Browse files
committed
Tweak logging levels
1 parent a62529d commit 827402b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

lib/concurrent/actor/default_dead_letter_handler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Concurrent
22
module Actor
33
class DefaultDeadLetterHandler < Context
44
def on_message(dead_letter)
5-
log Logging::WARN, "got dead letter #{dead_letter.inspect}"
5+
log Logging::INFO, "got dead letter #{dead_letter.inspect}"
66
end
77
end
88
end

spec/concurrent/actor_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ module Actor
2020

2121
def terminate_actors(*actors)
2222
actors.each do |actor|
23-
actor << :terminate!
24-
actor.terminated.wait(2) or
25-
raise 'timeout'
23+
unless actor.terminated?
24+
actor << :terminate!
25+
actor.terminated.wait(2) or
26+
raise 'timeout'
27+
end
2628
end
2729
end
2830

@@ -303,7 +305,7 @@ def on_message(message)
303305
expect(queue.pop).to eq :resumed
304306
terminate_actors test
305307

306-
test = AdHoc.spawn :tester do
308+
test = AdHoc.spawn :tester do
307309
actor = AdHoc.spawn name: :pausing, supervise: true, behaviour: Behaviour.restarting_behaviour do
308310
queue << :init
309311
-> m { m == :add ? 1 : pass }

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
require 'concurrent'
1919

2020
logger = Logger.new($stderr)
21-
logger.level = Logger::INFO
21+
logger.level = Logger::WARN
2222
Concurrent.configuration.logger = lambda do |level, progname, message = nil, &block|
2323
logger.add level, message, progname, &block
2424
end

0 commit comments

Comments
 (0)