Get new GVL code working on 1.8.7
This commit is contained in:
parent
228f540551
commit
b08c3ed2fc
4 changed files with 325 additions and 296 deletions
|
@ -1,25 +1,27 @@
|
|||
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
|
||||
|
||||
require 'test/unit'
|
||||
require 'lxc'
|
||||
require 'test_helpers'
|
||||
if RUBY_VERSION.to_f > 1.8
|
||||
require 'test/unit'
|
||||
require 'lxc'
|
||||
require 'test_helpers'
|
||||
|
||||
class TestLXCCreateAsynchronous < Test::Unit::TestCase
|
||||
include TestHelpers
|
||||
class TestLXCCreateAsynchronous < Test::Unit::TestCase
|
||||
include TestHelpers
|
||||
|
||||
def setup
|
||||
if Process::Sys::geteuid != 0
|
||||
raise 'This test must be ran as root'
|
||||
def setup
|
||||
if Process::Sys::geteuid != 0
|
||||
raise 'This test must be ran as root'
|
||||
end
|
||||
@name = 'test_async_create'
|
||||
container = LXC::Container.new(@name)
|
||||
container.destroy if container.defined?
|
||||
end
|
||||
@name = 'test_async_create'
|
||||
container = LXC::Container.new(@name)
|
||||
container.destroy if container.defined?
|
||||
end
|
||||
|
||||
def test_create_allows_ruby_to_continue
|
||||
c = LXC::Container.new(@name)
|
||||
assert_long_running_function_does_not_block_ruby do
|
||||
c.create('ubuntu')
|
||||
def test_create_allows_ruby_to_continue
|
||||
c = LXC::Container.new(@name)
|
||||
assert_long_running_function_does_not_block_ruby do
|
||||
c.create('ubuntu')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue