File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed
src/Symfony/Component/Lock Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change 1919use MongoDB \Exception \DriverRuntimeException ;
2020use MongoDB \Exception \InvalidArgumentException as MongoInvalidArgumentException ;
2121use MongoDB \Exception \UnsupportedException ;
22- use Symfony \Component \Lock \BlockingStoreInterface ;
2322use Symfony \Component \Lock \Exception \InvalidArgumentException ;
2423use Symfony \Component \Lock \Exception \InvalidTtlException ;
2524use Symfony \Component \Lock \Exception \LockAcquiringException ;
2625use Symfony \Component \Lock \Exception \LockConflictedException ;
2726use Symfony \Component \Lock \Exception \LockExpiredException ;
2827use Symfony \Component \Lock \Exception \LockStorageException ;
29- use Symfony \Component \Lock \Exception \NotSupportedException ;
3028use Symfony \Component \Lock \Key ;
29+ use Symfony \Component \Lock \PersistingStoreInterface ;
3130
3231/**
3332 * MongoDbStore is a StoreInterface implementation using MongoDB as a storage
4645 *
4746 * @author Joe Bennett <joe@assimtech.com>
4847 */
49- class MongoDbStore implements BlockingStoreInterface
48+ class MongoDbStore implements PersistingStoreInterface
5049{
5150 private $ collection ;
5251 private $ client ;
@@ -208,14 +207,6 @@ public function save(Key $key)
208207 $ this ->checkNotExpired ($ key );
209208 }
210209
211- /**
212- * {@inheritdoc}
213- */
214- public function waitAndSave (Key $ key )
215- {
216- throw new NotSupportedException (sprintf ('The store "%s" does not support blocking locks. ' , __CLASS__ ));
217- }
218-
219210 /**
220211 * {@inheritdoc}
221212 *
Original file line number Diff line number Diff line change 1414use MongoDB \Client ;
1515use MongoDB \Driver \Exception \ConnectionTimeoutException ;
1616use Symfony \Component \Lock \Exception \InvalidArgumentException ;
17- use Symfony \Component \Lock \Exception \NotSupportedException ;
1817use Symfony \Component \Lock \Key ;
1918use Symfony \Component \Lock \PersistingStoreInterface ;
2019use Symfony \Component \Lock \Store \MongoDbStore ;
@@ -81,17 +80,6 @@ public function testCreateIndex()
8180 $ this ->assertContains ('expires_at_1 ' , $ indexes );
8281 }
8382
84- public function testNonBlocking ()
85- {
86- $ this ->expectException (NotSupportedException::class);
87-
88- $ store = $ this ->getStore ();
89-
90- $ key = new Key (uniqid (__METHOD__ , true ));
91-
92- $ store ->waitAndSave ($ key );
93- }
94-
9583 /**
9684 * @dataProvider provideConstructorArgs
9785 */
You can’t perform that action at this time.
0 commit comments