Source
xxxxxxxxxx
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
require_once dirname(__FILE__).'/../common/testFormAdministrationGeneral.php';
/**
* @backup config
*/
class testFormAdministrationGeneralTimeouts extends testFormAdministrationGeneral {
public $form_selector = 'id:timeouts-form';
public $config_link = 'zabbix.php?action=timeouts.edit';
public $default_values = [
'Zabbix agent' => '3s',
'Simple check' => '3s',
'SNMP agent' => '3s',
'External check' => '3s',
'Database monitor' => '3s',
'HTTP agent' => '3s',
'SSH agent' => '3s',
'TELNET agent' => '3s',
'Script' => '3s',
'Browser' => '60s',
'Communication' => '3s',
'Connection' => '3s',
'Media type test' => '65s',
'Script execution' => '60s',
'Item test' => '60s',
'Scheduled report test' => '60s'
];
public $custom_values = [
'Zabbix agent' => '123s',
'Simple check' => '123s',
'SNMP agent' => '123s',
'External check' => '123s',
'Database monitor' => '123s',
'HTTP agent' => '123s',
'SSH agent' => '123s',
'TELNET agent' => '123s',
'Script' => '123s',
'Browser' => '123s',
'Communication' => '123s',
'Connection' => '15s',
'Media type test' => '123s',
'Script execution' => '123s',
'Item test' => '123s',
'Scheduled report test' => '123s'
];
public $db_default_values = [
'timeout_zabbix_agent' => '3s',
'timeout_simple_check' => '3s',
'timeout_snmp_agent' => '3s',
'timeout_external_check' => '3s',
'timeout_db_monitor' => '3s',
'timeout_http_agent' => '3s',
'timeout_ssh_agent' => '3s',
'timeout_telnet_agent' => '3s',
'timeout_script' => '3s',
'timeout_browser' => '60s',
'socket_timeout' => '3s',
'connect_timeout' => '3s',
'media_type_test_timeout' => '65s',
'script_timeout' => '60s',
'item_test_timeout' => '60s',
'report_test_timeout' => '60s'
];
/**
* Test for checking timeouts layout.
*/
public function testFormAdministrationGeneralTimeouts_Layout() {
$maxlengths = [
'Zabbix agent' => 255,
'Simple check' => 255,
'SNMP agent' => 255,
'External check' => 255,