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
sensu-em-2.7.0-java tests/test_exc.rb
eventmachine-1.2.2-java tests/test_exc.rb
eventmachine-1.2.2 tests/test_exc.rb
eventmachine-1.2.2-x86-mingw32 tests/test_exc.rb
eventmachine-1.2.2-x64-mingw32 tests/test_exc.rb
arcabouco-0.2.13 vendor/bundle/gems/eventmachine-1.2.0.1/tests/test_exc.rb
arcabouco-0.2.13 vendor/bundle/gems/eventmachine-1.2.1/tests/test_exc.rb
eventmachine-1.2.1-java tests/test_exc.rb
eventmachine-1.2.1-x64-mingw32 tests/test_exc.rb
eventmachine-1.2.1-x86-mingw32 tests/test_exc.rb
eventmachine-1.2.1 tests/test_exc.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.0.1/tests/test_exc.rb
sensu-em-2.6.0-java tests/test_exc.rb
eventmachine-1.2.0.1-java tests/test_exc.rb
eventmachine-1.2.0.1-x86-mingw32 tests/test_exc.rb
eventmachine-1.2.0.1-x64-mingw32 tests/test_exc.rb
eventmachine-1.2.0.1 tests/test_exc.rb
eventmachine-1.2.0 tests/test_exc.rb
eventmachine-1.2.0-x86-mingw32 tests/test_exc.rb
eventmachine-1.2.0-x64-mingw32 tests/test_exc.rb