diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-13 13:30:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 13:30:37 +0200 |
commit | 29c31b7ec6ca48ba37b7eb6da650931fd0cb7164 (patch) | |
tree | e4017d3c979604f40e78cdc305f0ab191aedd4b9 /tests/updater | |
parent | 458b6b9918ec27154dd45416947bb93bedb97109 (diff) | |
parent | fd1ddad98df45bc3c18be7980c1cbe68ce6b219c (diff) | |
download | Shaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.tar.gz Shaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.tar.zst Shaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.zip |
Merge pull request #1570 from ArthurHoaro/feature/datastore-mutex
Add mutex on datastore I/O operations
Diffstat (limited to 'tests/updater')
-rw-r--r-- | tests/updater/UpdaterTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php index a6280b8c..47332544 100644 --- a/tests/updater/UpdaterTest.php +++ b/tests/updater/UpdaterTest.php | |||
@@ -2,6 +2,7 @@ | |||
2 | namespace Shaarli\Updater; | 2 | namespace Shaarli\Updater; |
3 | 3 | ||
4 | use Exception; | 4 | use Exception; |
5 | use malkusch\lock\mutex\NoMutex; | ||
5 | use Shaarli\Bookmark\BookmarkFileService; | 6 | use Shaarli\Bookmark\BookmarkFileService; |
6 | use Shaarli\Bookmark\BookmarkServiceInterface; | 7 | use Shaarli\Bookmark\BookmarkServiceInterface; |
7 | use Shaarli\Config\ConfigManager; | 8 | use Shaarli\Config\ConfigManager; |
@@ -44,12 +45,13 @@ class UpdaterTest extends TestCase | |||
44 | */ | 45 | */ |
45 | protected function setUp(): void | 46 | protected function setUp(): void |
46 | { | 47 | { |
48 | $mutex = new NoMutex(); | ||
47 | $this->refDB = new \ReferenceLinkDB(); | 49 | $this->refDB = new \ReferenceLinkDB(); |
48 | $this->refDB->write(self::$testDatastore); | 50 | $this->refDB->write(self::$testDatastore); |
49 | 51 | ||
50 | copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); | 52 | copy('tests/utils/config/configJson.json.php', self::$configFile .'.json.php'); |
51 | $this->conf = new ConfigManager(self::$configFile); | 53 | $this->conf = new ConfigManager(self::$configFile); |
52 | $this->bookmarkService = new BookmarkFileService($this->conf, $this->createMock(History::class), true); | 54 | $this->bookmarkService = new BookmarkFileService($this->conf, $this->createMock(History::class), $mutex, true); |
53 | $this->updater = new Updater([], $this->bookmarkService, $this->conf, true); | 55 | $this->updater = new Updater([], $this->bookmarkService, $this->conf, true); |
54 | } | 56 | } |
55 | 57 | ||