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.4.1 tests/test_exc.rb
eventmachine-1.0.6-java tests/test_exc.rb
eventmachine-1.0.6 tests/test_exc.rb
eventmachine-1.0.5-java tests/test_exc.rb
eventmachine-1.0.5 tests/test_exc.rb
eventmachine-1.0.4-java tests/test_exc.rb
eventmachine-1.0.4 tests/test_exc.rb
sensu-em-2.4.0-x86-mingw32 tests/test_exc.rb
eventmachine-le-1.1.7 tests/test_exc.rb
sonixlabs-eventmachine-java-1.0.3.2-java tests/test_exc.rb
sonixlabs-eventmachine-java-1.0.3.1-java tests/test_exc.rb
sonixlabs-eventmachine-java-1.0.3.1 tests/test_exc.rb
sensu-em-2.4.0-java tests/test_exc.rb
sensu-em-2.4.0 tests/test_exc.rb
sensu-em-2.3.0-java tests/test_exc.rb
sensu-em-2.3.0 tests/test_exc.rb
sensu-em-2.2.0-java tests/test_exc.rb
sensu-em-2.2.0 tests/test_exc.rb
sensu-em-2.1.0-java tests/test_exc.rb
sensu-em-2.1.0 tests/test_exc.rb