Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-03-15 22:35:27 +0300
committerGitHub <noreply@github.com>2020-03-15 22:35:27 +0300
commitc7dc542e63645f57886d49fc288b792ee60785d0 (patch)
treecc79c3f7e74281c3229bbd7417fe6d618cb854a6 /plugins/Live/tests/Integration
parent7b053e85b5b037619dbee4fbcf3e7a9ca2bf8589 (diff)
respect max execution time limit for transitions plugin (#15652)
Diffstat (limited to 'plugins/Live/tests/Integration')
-rw-r--r--plugins/Live/tests/Integration/ModelTest.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/Live/tests/Integration/ModelTest.php b/plugins/Live/tests/Integration/ModelTest.php
index eeede80c97..19bc97e82b 100644
--- a/plugins/Live/tests/Integration/ModelTest.php
+++ b/plugins/Live/tests/Integration/ModelTest.php
@@ -82,8 +82,7 @@ class ModelTest extends IntegrationTestCase
$dateEnd = Date::now();
$minTimestamp = 1;
$limit = 50;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, [$sql, $bind]);
$this->assertTrue(true);
}
@@ -102,8 +101,7 @@ class ModelTest extends IntegrationTestCase
$dateEnd = Date::now();
$minTimestamp = null;
$limit = 50;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, [$sql, $bind]);
}
/**
@@ -114,15 +112,12 @@ class ModelTest extends IntegrationTestCase
{
$db = Db::get();
$e = new \Exception('Query execution was interrupted, maximum statement execution time exceeded');
- $sql = 'SELECT 1';
- $bind = array();
$segment = 'userId>=1';
$dateStart = Date::now()->subDay(10);
$dateEnd = Date::now();
$minTimestamp = null;
$limit = 5000;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, ['param' => 'value']);
}
public function test_getStandAndEndDate()