Skip to content

Commit

Permalink
.......... [DEV-2111] added integration test for confsyncer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrijs Goloscapovs committed Sep 15, 2022
1 parent d96e5c3 commit d3a728a
Show file tree
Hide file tree
Showing 9 changed files with 5,008 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
<arg line="--enable-agent2"/>
<arg line="--with-postgresql"/>
<arg line="--prefix=${basedir}"/>
<arg line="--with-libcurl"/>
</exec>
<exec executable="make" failonerror="on">
<arg line="-j4"/>
Expand Down Expand Up @@ -311,6 +312,7 @@
<arg line="--enable-agent2"/>
<arg line="--with-mysql"/>
<arg line="--prefix=${basedir}"/>
<arg line="--with-libcurl"/>
</exec>
<exec executable="make" failonerror="on">
<arg line="-j4"/>
Expand Down
4 changes: 3 additions & 1 deletion src/libs/zbxdbcache/dbconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -3232,7 +3232,7 @@ static void DCsync_triggers(zbx_dbsync_t *sync, zbx_uint32_t revision)
int found, ret;
zbx_uint64_t triggerid;

zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
zabbix_log(LOG_LEVEL_DEBUG, "In %s()1 ", __func__);

while (SUCCEED == (ret = zbx_dbsync_next(sync, &rowid, &row, &tag)))
{
Expand Down Expand Up @@ -3263,6 +3263,8 @@ static void DCsync_triggers(zbx_dbsync_t *sync, zbx_uint32_t revision)
ZBX_STR2UCHAR(trigger->recovery_mode, row[10]);
ZBX_STR2UCHAR(trigger->correlation_mode, row[12]);

zabbix_log(1, "DBG trigger expr '%s'", trigger->expression);

if (0 == found)
{
dc_strpool_replace(found, &trigger->error, row[3]);
Expand Down
2 changes: 2 additions & 0 deletions ui/tests/include/CIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ protected static function waitForStartup($component, $waitLogLineOverride = '',
sleep(self::WAIT_ITERATION_DELAY);
}

var_dump(file_get_contents(self::getLogPath(self::COMPONENT_SERVER)));

throw new Exception('Failed to wait for component "'.$component.'" to start.');
}

Expand Down
2 changes: 2 additions & 0 deletions ui/tests/integration/IntegrationTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/

require_once dirname(__FILE__).'/testInitialConfSync.php';
require_once dirname(__FILE__).'/testTimescaleDb.php';
require_once dirname(__FILE__).'/testDataCollection.php';
require_once dirname(__FILE__).'/testDiagnosticDataTask.php';
Expand Down Expand Up @@ -71,6 +72,7 @@ public static function suite() {
$suite->addTestSuite('testUserParametersReload');
$suite->addTestSuite('testTriggerState');
$suite->addTestSuite('testActiveAvailability');
$suite->addTestSuite('testInitialConfSync');

return $suite;
}
Expand Down
Loading

0 comments on commit d3a728a

Please sign in to comment.