aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-09-09 16:59:59 +0200
committerRobin Appelman <robin@icewind.nl>2024-09-09 16:59:59 +0200
commitda59fd4389bedd6b643f277b5e411872137569b3 (patch)
tree89a6c3cac4b2f066d104e633439a3709cd0797ad /tests
parent0f732199d22cf85d991f48389c33fb6e76b7eefc (diff)
downloadnextcloud-server-da59fd4389bedd6b643f277b5e411872137569b3.tar.gz
nextcloud-server-da59fd4389bedd6b643f277b5e411872137569b3.zip
fix: misc code fixes around db shardingsharding-code-fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php14
-rw-r--r--tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php14
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php
index 12ba74fe89f..697b3ab92c9 100644
--- a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php
@@ -51,7 +51,7 @@ class PartitionedQueryBuilderTest extends TestCase {
}
}
- private function setupFileCache() {
+ private function setupFileCache(): void {
$this->cleanupDb();
$query = $this->getQueryBuilder();
$query->insert('storages')
@@ -92,7 +92,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$query->executeStatement();
}
- private function cleanupDb() {
+ private function cleanupDb(): void {
$query = $this->getQueryBuilder();
$query->delete('storages')
->where($query->expr()->gt('numeric_id', $query->createNamedParameter(1000000, IQueryBuilder::PARAM_INT)));
@@ -115,7 +115,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$query->executeStatement();
}
- public function testSimpleOnlyPartitionQuery() {
+ public function testSimpleOnlyPartitionQuery(): void {
$builder = $this->getQueryBuilder();
$builder->addPartition(new PartitionSplit('filecache', ['filecache']));
@@ -129,7 +129,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$this->assertEquals($results[0]['path'], 'file1');
}
- public function testSimplePartitionedQuery() {
+ public function testSimplePartitionedQuery(): void {
$builder = $this->getQueryBuilder();
$builder->addPartition(new PartitionSplit('filecache', ['filecache']));
@@ -151,7 +151,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$this->assertEquals($results[0]['path'], 'file1');
}
- public function testMultiTablePartitionedQuery() {
+ public function testMultiTablePartitionedQuery(): void {
$builder = $this->getQueryBuilder();
$builder->addPartition(new PartitionSplit('filecache', ['filecache', 'filecache_extended']));
@@ -174,7 +174,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$this->assertEquals($results[0]['upload_time'], 1234);
}
- public function testPartitionedQueryFromSplit() {
+ public function testPartitionedQueryFromSplit(): void {
$builder = $this->getQueryBuilder();
$builder->addPartition(new PartitionSplit('filecache', ['filecache']));
@@ -195,7 +195,7 @@ class PartitionedQueryBuilderTest extends TestCase {
$this->assertEquals($results[0]['path'], 'file1');
}
- public function testMultiJoinPartitionedQuery() {
+ public function testMultiJoinPartitionedQuery(): void {
$builder = $this->getQueryBuilder();
$builder->addPartition(new PartitionSplit('filecache', ['filecache']));
diff --git a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
index 8f95c1b6263..a135b9159dd 100644
--- a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
@@ -46,7 +46,7 @@ class SharedQueryBuilderTest extends TestCase {
);
}
- public function testGetShardKeySingleParam() {
+ public function testGetShardKeySingleParam(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')
@@ -56,7 +56,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->assertEquals([10], $query->getShardKeys());
}
- public function testGetPrimaryKeyParam() {
+ public function testGetPrimaryKeyParam(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')
@@ -66,7 +66,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->assertEquals([], $query->getShardKeys());
}
- public function testValidateWithShardKey() {
+ public function testValidateWithShardKey(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')
@@ -76,7 +76,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->assertTrue(true);
}
- public function testValidateWithPrimaryKey() {
+ public function testValidateWithPrimaryKey(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')
@@ -86,7 +86,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->assertTrue(true);
}
- public function testValidateWithNoKey() {
+ public function testValidateWithNoKey(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')
@@ -97,7 +97,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->fail('exception expected');
}
- public function testValidateNonSharedTable() {
+ public function testValidateNonSharedTable(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('configvalue')
->from('appconfig')
@@ -107,7 +107,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->assertTrue(true);
}
- public function testGetShardKeyMultipleSingleParam() {
+ public function testGetShardKeyMultipleSingleParam(): void {
$query = $this->getQueryBuilder('filecache', 'storage', 'fileid');
$query->select('fileid', 'path')
->from('filecache')