Skip to content

Commit

Permalink
Merge pull request #28171 from sorra/fresh-thread-tagged-logging
Browse files Browse the repository at this point in the history
Improve test for TaggedLogging "keeps each tag in their own thread"
  • Loading branch information
kamipo committed Feb 3, 2018
2 parents cb9e35e + 9ce2405 commit 4d99720
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion activesupport/test/tagged_logging_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ def flush(*)
test "keeps each tag in their own thread" do
@logger.tagged("BCX") do
Thread.new do
@logger.info "Dull story"
@logger.tagged("OMG") { @logger.info "Cool story" }
end.join
@logger.info "Funky time"
end
assert_equal "[OMG] Cool story\n[BCX] Funky time\n", @output.string
assert_equal "Dull story\n[OMG] Cool story\n[BCX] Funky time\n", @output.string
end

test "keeps each tag in their own instance" do
Expand Down

0 comments on commit 4d99720

Please sign in to comment.