From 77cec29b108df7d9c868d60baf74fbe9b64e08f5 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Tue, 26 Apr 2016 22:30:09 +0100 Subject: Prevent concurrent availability checks --- tests/lib/files/storage/wrapper/availability.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/lib/files/storage') diff --git a/tests/lib/files/storage/wrapper/availability.php b/tests/lib/files/storage/wrapper/availability.php index 9b394df8ca3..99d6f7dbe5c 100644 --- a/tests/lib/files/storage/wrapper/availability.php +++ b/tests/lib/files/storage/wrapper/availability.php @@ -74,9 +74,12 @@ class Availability extends \Test\TestCase { $storage->expects($this->once()) ->method('test') ->willReturn(true); - $storage->expects($this->once()) + $storage->expects($this->exactly(2)) ->method('setAvailability') - ->with($this->equalTo(true)); + ->withConsecutive( + [$this->equalTo(false)], // prevents concurrent rechecks + [$this->equalTo(true)] // sets correct availability + ); $storage->expects($this->once()) ->method('mkdir'); -- cgit v1.2.3