From aaa67252233ab8a5c62958df2f99405ce1a7a903 Mon Sep 17 00:00:00 2001 From: Jiri Semmler Date: Wed, 29 Jan 2025 08:21:45 +0100 Subject: [PATCH] Skip for BQ/Exasol --- tests/Backend/CommonPart1/DeleteRowsTest.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/Backend/CommonPart1/DeleteRowsTest.php b/tests/Backend/CommonPart1/DeleteRowsTest.php index ec0e7ad3f..3405c26c5 100644 --- a/tests/Backend/CommonPart1/DeleteRowsTest.php +++ b/tests/Backend/CommonPart1/DeleteRowsTest.php @@ -32,7 +32,7 @@ public function testTableDeleteRowsByFilter(array $filterParams, array $expected $importFile = __DIR__ . '/../../_data/users.csv'; $tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile)); $tableInfo = $this->_client->getTable($tableId); - if ($this->isBigqueryWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) { + if ($this->isBigqueryOrExasolWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) { $this->markTestSkipped('BQ does not new params of valuesBy* yet'); } @@ -68,7 +68,7 @@ public function testTableDeleteRowsByFilterAsQuery(array $filterParams, array $e $importFile = __DIR__ . '/../../_data/users.csv'; $tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile)); $tableInfo = $this->_client->getTable($tableId); - if ($this->isBigqueryWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) { + if ($this->isBigqueryOrExasolWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) { $this->markTestSkipped('BQ does not new params of valuesBy* yet'); } $this->_client->deleteTableRowsAsQuery($tableId, $filterParams); @@ -82,7 +82,7 @@ public function testTableDeleteRowsByFilterAsQuery(array $filterParams, array $e } // because BQ/exa does not support valuesByTableInStorage / valuesByTableInWorkspace yet/. Tmp fix - private function isBigqueryWithNewDeleteRows(string $backendName, array $filterParams): bool + private function isBigqueryOrExasolWithNewDeleteRows(string $backendName, array $filterParams): bool { return in_array($backendName, ['bigquery', 'exasol']) && array_key_exists('whereFilters', $filterParams) && @@ -372,6 +372,8 @@ public function tableDeleteRowsByFiltersData(): array public function testDeleteByValuesInWorkspaceWithInvalidData(): void { + $this->skipTestForBackend(['bigquery', 'exasol'], 'Not supported in BQ/Exasol yet'); + $importFile = __DIR__ . '/../../_data/users.csv'; $tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile)); @@ -383,7 +385,6 @@ public function testDeleteByValuesInWorkspaceWithInvalidData(): void $runId = $this->_client->generateRunId(); $this->_client->setRunId($runId); - $this->_client->setRunId($runId); $workspace = $workspaces->createWorkspace(); $backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace); @@ -462,6 +463,7 @@ public function testDeleteByValuesInWorkspaceWithInvalidData(): void public function testDeleteByValuesInWorkspaceWithValidData(): void { $importFile = __DIR__ . '/../../_data/users.csv'; + $this->skipTestForBackend(['bigquery', 'exasol'], 'Not supported in BQ/Exasol yet'); $tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile)); $workspaces = new Workspaces($this->_client); @@ -472,7 +474,6 @@ public function testDeleteByValuesInWorkspaceWithValidData(): void $runId = $this->_client->generateRunId(); $this->_client->setRunId($runId); - $this->_client->setRunId($runId); $workspace = $workspaces->createWorkspace(); $backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);