Sha256: 12fbb9882752b4d124ce5322a07b3c6827e9fe09a232e763c4d1394a85daef5d

Contents?: true

Size: 894 Bytes

Versions: 24

Compression:

Stored size: 894 Bytes

Contents

require 'spec_helper'

describe 'forked client integration' do
  describe :forked, :fork_required => true, :rbx => :broken do
    include_context 'connection opts'

    before do
      @base_path = '/zktests'
      @pids_root = "#{@base_path}/pid"
      
      @cnx_args = ["#{ZK.default_host}:#{ZK.test_port}", { :thread => :per_callback, :timeout => 5 }]

      ZK.open(*@cnx_args) do |z|
        z.rm_rf(@base_path)
        z.mkdir_p(@pids_root)
      end
    end

    after do
      ZK.open(*connection_args) { |z| z.rm_rf(@base_path) }
    end

    it %[should deliver callbacks in the child] do
      10.times do 
        ClientForker.run(@cnx_args, @base_path) do |forker|
          forker.stat.should_not be_signaled
          forker.stat.should be_exited
          forker.stat.should be_success
        end
      end
    end # should deliver callbacks in the child
  end # forked
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
zk-1.9.6 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.5 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.4 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.3 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.2 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.1 spec/zk/00_forked_client_integration_spec.rb
zk-1.9.0 spec/zk/00_forked_client_integration_spec.rb
zk-1.8.0 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.5 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.4 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.3 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.2 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.1 spec/zk/00_forked_client_integration_spec.rb
zk-1.7.0 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.5 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.4 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.3 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.2 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.1 spec/zk/00_forked_client_integration_spec.rb
zk-1.6.0 spec/zk/00_forked_client_integration_spec.rb