diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-12-31 04:14:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 04:14:06 +0300 |
commit | f11b1827cd3d9ceb92683a40cb3bebe3a94713fc (patch) | |
tree | ef3980bb3c68deeeadfd81f31fd6c46fb006aca8 /tests/PHPUnit/Integration | |
parent | 71f81a7541cee64cbdf7879dd34b2f1176fa8390 (diff) |
Fix log tmp segment may be too long (#15312)
* Fix log tmp segment may be too long
* fix tests
Diffstat (limited to 'tests/PHPUnit/Integration')
-rw-r--r-- | tests/PHPUnit/Integration/DataAccess/LogAggregatorTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/DataAccess/LogAggregatorTest.php b/tests/PHPUnit/Integration/DataAccess/LogAggregatorTest.php index 968b98e73c..817595270b 100644 --- a/tests/PHPUnit/Integration/DataAccess/LogAggregatorTest.php +++ b/tests/PHPUnit/Integration/DataAccess/LogAggregatorTest.php @@ -10,6 +10,7 @@ namespace Piwik\Tests\Integration\DataAccess; use Piwik\ArchiveProcessor\ArchivingStatus; use Piwik\ArchiveProcessor\Parameters; +use Piwik\Config; use Piwik\Common; use Piwik\Container\StaticContainer; use Piwik\DataAccess\LogAggregator; @@ -79,6 +80,17 @@ class LogAggregatorTest extends IntegrationTestCase $this->assertSame($expected, $query); } + public function test_getSegmentTmpTableName() + { + $this->assertEquals('logtmpsegmentcc2efa0acbd5f209e8ee8618e72f3f9b', $this->logAggregator->getSegmentTmpTableName()); + } + + public function test_getSegmentTmpTableNameWithLongPrefix() + { + Config::getInstance()->database['tables_prefix'] = 'myverylongtableprefixtestfoobartest'; + $this->assertEquals('logtmpsegmentcc2efa0acbd5f209', $this->logAggregator->getSegmentTmpTableName()); + } + public function test_generateQuery_WithQueryHint_ShouldAddQueryHintAsComment() { $this->logAggregator->setQueryOriginHint('MyPluginName'); |