Sha256: 48a0a624bbdb8b1b0157f6e71b720da1b0aa390f7b54e78100b40cda5877f94e

Contents?: true

Size: 650 Bytes

Versions: 121

Compression:

Stored size: 650 Bytes

Contents

require 'em_test_helper'

class TestSomeExceptions < Test::Unit::TestCase

  # Read the commentary in EM#run.
  # This test exercises the ensure block in #run that makes sure
  # EM#release_machine gets called even if an exception is
  # thrown within the user code. Without the ensured call to release_machine,
  # the second call to EM#run will fail with a C++ exception
  # because the machine wasn't cleaned up properly.

  def test_a
    assert_raises(RuntimeError) {
      EM.run {
      raise "some exception"
    }
    }
  end

  def test_b
    assert_raises(RuntimeError) {
      EM.run {
      raise "some exception"
    }
    }
  end

end

Version data entries

121 entries across 120 versions & 8 rubygems

Version Path
eventmachine-1.0.0.rc.2-x86-mswin32-60 tests/test_exc.rb
eventmachine-1.0.0.rc.2-x86-mingw32 tests/test_exc.rb
eventmachine-1.0.0.rc.2 tests/test_exc.rb
eventmachine-1.0.0.rc.1-x86-mswin32-60 tests/test_exc.rb
eventmachine-1.0.0.rc.1-x86-mingw32 tests/test_exc.rb
eventmachine-1.0.0.rc.1-java tests/test_exc.rb
eventmachine-1.0.0.rc.1 tests/test_exc.rb
eventmachine-le-1.1.0 tests/test_exc.rb
eventmachine-le-1.1.0.beta.2 tests/test_exc.rb
eventmachine-le-1.1.0.beta.1 tests/test_exc.rb
eventmachine-with-ipv6-1.0.0.beta.4.ipv6.0 tests/test_exc.rb
eventmachine-1.0.0.beta.4.1-x86-mswin32-60 tests/test_exc.rb
eventmachine-1.0.0.beta.4.1-x86-mingw32 tests/test_exc.rb
eventmachine-1.0.0.beta.4-x86-mswin32-60 tests/test_exc.rb
eventmachine-1.0.0.beta.4-x86-mingw32 tests/test_exc.rb
eventmachine-1.0.0.beta.4-java tests/test_exc.rb
eventmachine-1.0.0.beta.4 tests/test_exc.rb
eventmachine-1.0.0.beta.3-x86-mingw32 tests/test_exc.rb
eventmachine-1.0.0.beta.3-x86-mswin32-60 tests/test_exc.rb
eventmachine-1.0.0.beta.3-java tests/test_exc.rb