Skip to content

Commit 9b75428

Browse files
committed
Trying to get Travis not to fail on thread tests
1 parent 0409456 commit 9b75428

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/redis_objects_instance_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@
711711
lock.lock do
712712
lock.exists?.should.be.true
713713
REDIS_HANDLE.exists?("test_lock0").should.be.true
714-
sleep 0.3 # hand onto the lock
714+
sleep 1.0 # hang onto the lock across other thread
715715
end
716716
end
717717

@@ -735,7 +735,7 @@
735735
lock.lock do
736736
lock.exists?.should.be.true
737737
REDIS_HANDLE.exists?("test_lock1").should.be.true
738-
sleep 0.3 # hang onto the lock > expiry
738+
sleep 1.0 # hang onto the lock > expiry
739739
end
740740

741741
# lock value should not be set since the lock was held for more than the expiry
@@ -749,7 +749,7 @@
749749

750750
lock.lock do
751751
REDIS_HANDLE.exists?("test_lock2").should.be.true
752-
sleep 0.3 # expired, key is deleted
752+
sleep 1.0 # expired, key is deleted
753753
REDIS_HANDLE.exists?("test_lock2").should.be.false
754754
REDIS_HANDLE.set("test_lock2", "foo") # this is no longer a lock key, name is a coincidence
755755
end
@@ -758,7 +758,7 @@
758758
end
759759

760760
it "should manually delete the key if finished before expiration" do
761-
lock = Redis::Lock.new(:test_lock3, :expiration => 1.0)
761+
lock = Redis::Lock.new(:test_lock3, :expiration => 10.0)
762762

763763
lock.lock do
764764
REDIS_HANDLE.exists?("test_lock3").should.be.true

0 commit comments

Comments
 (0)