From 7963969a4697539cb4a10196c65be4768100996a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Weigert?= Date: Fri, 27 Aug 2021 13:00:57 +0200 Subject: [PATCH] default pollintervall 30000 msec The desktop client uses a default poll interval of 30000 msec whenever the capabilities announce something less than 5000. To get in sync with this behaviour, I suggest to also change the value here to 30000. A value of 60 also leads to confusion, as users asume the unit is seconds, which it is not. Suggestion for future: Hardcode the unit in the name of the variable, like. e.g. `pollinterval_msec` --- changelog/unreleased/39143 | 6 +++ lib/private/OCS/CoreCapabilities.php | 3 +- .../apiCapabilities/capabilities.feature | 50 +++++++++---------- .../capabilitiesWithNormalUser.feature | 2 +- 4 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 changelog/unreleased/39143 diff --git a/changelog/unreleased/39143 b/changelog/unreleased/39143 new file mode 100644 index 000000000000..025f4e83ba59 --- /dev/null +++ b/changelog/unreleased/39143 @@ -0,0 +1,6 @@ +Change: Update the default poll-interval in capabilities + +The default pollinterval advertised in capabilities has been set to +30000 milliseconds. Previously it was 60 milliseconds. + +https://github.com/owncloud/core/pull/39143 diff --git a/lib/private/OCS/CoreCapabilities.php b/lib/private/OCS/CoreCapabilities.php index fa37557da388..456c0f4c0702 100644 --- a/lib/private/OCS/CoreCapabilities.php +++ b/lib/private/OCS/CoreCapabilities.php @@ -51,7 +51,8 @@ public function __construct(IConfig $config) { public function getCapabilities() { return [ 'core' => [ - 'pollinterval' => $this->config->getSystemValue('pollinterval', 60), + // pollinterval is an integer number of milliseconds + 'pollinterval' => $this->config->getSystemValue('pollinterval', 30000), 'webdav-root' => $this->config->getSystemValue('webdav-root', 'remote.php/webdav'), 'status' => Util::getStatusInfo(true), 'support-url-signing' => true, diff --git a/tests/acceptance/features/apiCapabilities/capabilities.feature b/tests/acceptance/features/apiCapabilities/capabilities.feature index c08aa4e4bc50..70a64565d55a 100644 --- a/tests/acceptance/features/apiCapabilities/capabilities.feature +++ b/tests/acceptance/features/apiCapabilities/capabilities.feature @@ -41,7 +41,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | core | status@@@edition | %edition% | | core | status@@@productname | %productname% | @@ -304,7 +304,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -329,7 +329,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | EMPTY | | files_sharing | can_share | EMPTY | @@ -348,7 +348,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -371,7 +371,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -395,7 +395,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -419,7 +419,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -443,7 +443,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -470,7 +470,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -497,7 +497,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -524,7 +524,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -548,7 +548,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -572,7 +572,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -598,7 +598,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -624,7 +624,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -648,7 +648,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -672,7 +672,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -697,7 +697,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -723,7 +723,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -746,7 +746,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -770,7 +770,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -799,7 +799,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -830,7 +830,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | EMPTY | @@ -861,7 +861,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | 1 | @@ -893,7 +893,7 @@ Feature: capabilities And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | files_sharing | api_enabled | 1 | | files_sharing | can_share | EMPTY | diff --git a/tests/acceptance/features/apiCapabilities/capabilitiesWithNormalUser.feature b/tests/acceptance/features/apiCapabilities/capabilitiesWithNormalUser.feature index 1473cb498c79..55fa7a43840f 100644 --- a/tests/acceptance/features/apiCapabilities/capabilitiesWithNormalUser.feature +++ b/tests/acceptance/features/apiCapabilities/capabilitiesWithNormalUser.feature @@ -14,7 +14,7 @@ Feature: default capabilities for normal user And the HTTP status code should be "200" And the capabilities should contain | capability | path_to_element | value | - | core | pollinterval | 60 | + | core | pollinterval | 30000 | | core | webdav-root | remote.php/webdav | | core | status@@@edition | %edition% | | core | status@@@productname | %productname% |