Sha256: 9dee847299b2bbfad336f636010356792e6c61f8168983f31a7b2e8410f151ce

Contents?: true

Size: 631 Bytes

Versions: 61

Compression:

Stored size: 631 Bytes

Contents

$: << File.join("..","lib")
require "test/unit"
require "log4r"
include Log4r

class TestMDC < Test::Unit::TestCase

  def test_multithread_copy
    Log4r::MDC.put("user","colbygk")
    t = Thread.new("test first copy") do |name|
      assert(Log4r::MDC.get("user") == "colbygk",
	     "Did not get back expected value, '#{MDC.get("user")}'")
      Log4r::MDC.put("user","unique")
      assert(Log4r::MDC.get("user") == "unique",
	     "Did not get back expected value, '#{MDC.get("user")}'")
    end
    t.join
    assert(Log4r::MDC.get("user") == "colbygk",
	   "Did not get back expected value, '#{MDC.get("user")}'")
  end
end

Version data entries

61 entries across 31 versions & 2 rubygems

Version Path
depengine-0.0.31 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.31 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testMDC.rb