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/config/config.sample.php b/config/config.sample.php index 235c117f8665..a617d2a165f6 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1491,6 +1491,16 @@ */ 'minimum.supported.desktop.version' => '2.3.3', +/** + * Define the suggested poll interval for clients + * Specifies how often clients should poll the server for changes. + * The value is in milliseconds. The value is not enforced. + * Clients may use this value to decide how frequently to check the server for + * changes. + * + */ +'pollinterval' => 30000, + /** * Define whether to include external storage in quota calculation * EXPERIMENTAL: option whether to include external storage in quota 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% |