diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-29 00:22:32 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-29 00:26:20 +0200 |
commit | 498b7399c1f5e692e905c3cea72f3595b9120eb1 (patch) | |
tree | fbe5d62c356fa17b13001f2a41ecaaec9253d40d /apps/files_sharing/lib/External | |
parent | 2eab2ffa22451851601d68bd73e0285a8803990e (diff) | |
download | nextcloud-server-498b7399c1f5e692e905c3cea72f3595b9120eb1.tar.gz nextcloud-server-498b7399c1f5e692e905c3cea72f3595b9120eb1.zip |
Inject IHTTPClientService
Otherwise the unit test execution will do a ton of external HTTP requests which fail and then timeout…
See https://blackfire.io/profiles/compare/3c67acfa-a11e-4aec-bcd4-c945b006f01e/graph for reference
Pretty similar to https://github.com/nextcloud/server/pull/1565
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files_sharing/lib/External')
-rw-r--r-- | apps/files_sharing/lib/External/MountProvider.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/External/Storage.php | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php index f46bb009ab0..3f2f39a74f7 100644 --- a/apps/files_sharing/lib/External/MountProvider.php +++ b/apps/files_sharing/lib/External/MountProvider.php @@ -56,6 +56,7 @@ class MountProvider implements IMountProvider { $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); $data['mountpoint'] = $mountPoint; $data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID()); + $data['HttpClientService'] = \OC::$server->getHTTPClientService(); return new Mount(self::STORAGE, $mountPoint, $data, $manager, $storageFactory); } diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index caa2bcf2a79..93f3571e803 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -64,10 +64,10 @@ class Storage extends DAV implements ISharedStorage { public function __construct($options) { $this->memcacheFactory = \OC::$server->getMemCacheFactory(); - $this->httpClient = \OC::$server->getHTTPClientService(); + $this->httpClient = $options['HttpClientService']; $discoveryManager = new DiscoveryManager( $this->memcacheFactory, - \OC::$server->getHTTPClientService() + $this->httpClient ); $this->manager = $options['manager']; |