Source
protected static function waitForLogLineToBePresent($component, $lines, $incremental = true, $iterations = null, $delay = null, $match_regex = false) {
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once 'vendor/autoload.php';
require_once dirname(__FILE__).'/CAPITest.php';
require_once dirname(__FILE__).'/CZabbixClient.php';
require_once dirname(__FILE__).'/helpers/CLogHelper.php';
/**
* Base class for integration tests.
*/
class CIntegrationTest extends CAPITest {
// Default iteration count for wait operations.
const WAIT_ITERATIONS = 60;
// Default delays (in seconds):
const WAIT_ITERATION_DELAY = 1; // Wait iteration delay.
const CACHE_RELOAD_DELAY = 5; // Configuration cache reload delay.
const DATA_PROCESSING_DELAY = 5; // Data processing delay.
// Zabbix component constants.
const COMPONENT_SERVER = 'server';
const COMPONENT_SERVER_HANODE1 = 'server_ha1';
const COMPONENT_PROXY = 'proxy';
const COMPONENT_AGENT = 'agentd';
const COMPONENT_AGENT2 = 'agent2';
// Zabbix component port constants.
const AGENT_PORT_SUFFIX = '50';
const SERVER_PORT_SUFFIX = '51';
const PROXY_PORT_SUFFIX = '52';
const SERVER_HANODE1_PORT_SUFFIX = '61';
const AGENT2_PORT_SUFFIX = '53';
/**
* Components required by test suite.
*
* @var array
*/
private static $suite_components = [];
/**
* Hosts to be enabled for test suite.
*