Sha256: 76508fde3cbfcc4fb6c87a1c76bc11ce23a19647a6ffe05e095bce24a491c8ba

Contents?: true

Size: 501 Bytes

Versions: 81

Compression:

Stored size: 501 Bytes

Contents

require 'spec_helper'

# this is a simple sanity check of my timeout addition

describe Zookeeper::Latch do
  subject { described_class.new }

  describe %[await] do
    describe %[with timeout] do
      it %[should return after waiting until timeout if not released] do
        other_latch = described_class.new

        th = Thread.new do
          subject.await(0.01)
          other_latch.release
        end

        other_latch.await
        th.join(1).should == th
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 2 rubygems

Version Path
zookeeper-1.5.3 spec/latch_spec.rb
zookeeper-1.5.3-java spec/latch_spec.rb
zookeeper-ng-1.5.2.1 spec/latch_spec.rb
zookeeper-ng-1.5.2.1-java spec/latch_spec.rb
zookeeper-1.5.1-java spec/latch_spec.rb
zookeeper-1.5.1 spec/latch_spec.rb
zookeeper-1.5.0-java spec/latch_spec.rb
zookeeper-1.5.0 spec/latch_spec.rb
zookeeper-ng-1.5 spec/latch_spec.rb
zookeeper-1.4.11 spec/latch_spec.rb
zookeeper-1.4.11-java spec/latch_spec.rb
zookeeper-1.4.10 spec/latch_spec.rb
zookeeper-1.4.10-java spec/latch_spec.rb
zookeeper-1.4.9 spec/latch_spec.rb
zookeeper-1.4.9-java spec/latch_spec.rb
zookeeper-1.4.8 spec/latch_spec.rb
zookeeper-1.4.8-java spec/latch_spec.rb
zookeeper-1.4.7 spec/latch_spec.rb
zookeeper-1.4.7-java spec/latch_spec.rb
zookeeper-1.4.6 spec/latch_spec.rb