-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for fault tolerant execution
- Loading branch information
Showing
19 changed files
with
559 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...o-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionAggregations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.trino.plugin.hive; | ||
|
||
import io.trino.testing.AbstractTestFaultTolerantExecutionAggregations; | ||
import io.trino.testing.QueryRunner; | ||
|
||
import java.util.Map; | ||
|
||
import static io.trino.tpch.TpchTable.getTables; | ||
|
||
public class TestHiveFaultTolerantExecutionAggregations | ||
extends AbstractTestFaultTolerantExecutionAggregations | ||
{ | ||
@Override | ||
protected QueryRunner createQueryRunner(Map<String, String> extraProperties) | ||
throws Exception | ||
{ | ||
return HiveQueryRunner.builder() | ||
.setExtraProperties(extraProperties) | ||
.setInitialTables(getTables()) | ||
.build(); | ||
} | ||
} |
93 changes: 93 additions & 0 deletions
93
...-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionConnectorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.trino.plugin.hive; | ||
|
||
import io.trino.testing.FaultTolerantExecutionConnectorTestHelper; | ||
|
||
import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
|
||
public class TestHiveFaultTolerantExecutionConnectorTest | ||
extends BaseHiveConnectorTest | ||
{ | ||
public TestHiveFaultTolerantExecutionConnectorTest() | ||
{ | ||
super(FaultTolerantExecutionConnectorTestHelper.getExtraProperties()); | ||
} | ||
|
||
@Override | ||
public void testGroupedExecution() | ||
{ | ||
// grouped execution is not supported (and not needed) with batch execution enabled | ||
} | ||
|
||
@Override | ||
public void testScaleWriters() | ||
{ | ||
testWithAllStorageFormats(this::testSingleWriter); | ||
} | ||
|
||
@Override | ||
public void testTargetMaxFileSize() | ||
{ | ||
testTargetMaxFileSize(1); | ||
} | ||
|
||
@Override | ||
public void testTargetMaxFileSizePartitioned() | ||
{ | ||
testTargetMaxFileSizePartitioned(1); | ||
} | ||
|
||
@Override | ||
public void testOptimize() | ||
{ | ||
assertThatThrownBy(super::testOptimize) | ||
.hasMessageContaining("OPTIMIZE procedure is not supported with query retries enabled"); | ||
} | ||
|
||
@Override | ||
public void testOptimizeWithWriterScaling() | ||
{ | ||
assertThatThrownBy(super::testOptimizeWithWriterScaling) | ||
.hasMessageContaining("OPTIMIZE procedure is not supported with query retries enabled"); | ||
} | ||
|
||
@Override | ||
public void testOptimizeWithPartitioning() | ||
{ | ||
assertThatThrownBy(super::testOptimizeWithPartitioning) | ||
.hasMessageContaining("OPTIMIZE procedure is not supported with query retries enabled"); | ||
} | ||
|
||
@Override | ||
public void testOptimizeWithBucketing() | ||
{ | ||
assertThatThrownBy(super::testOptimizeWithBucketing) | ||
.hasMessageContaining("OPTIMIZE procedure is not supported with query retries enabled"); | ||
} | ||
|
||
@Override | ||
public void testOptimizeHiveInformationSchema() | ||
{ | ||
assertThatThrownBy(super::testOptimizeHiveInformationSchema) | ||
.hasMessageContaining("This connector does not support query retries"); | ||
} | ||
|
||
@Override | ||
public void testOptimizeHiveSystemTable() | ||
{ | ||
assertThatThrownBy(super::testOptimizeHiveSystemTable) | ||
.hasMessageContaining("This connector does not support query retries"); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...no-hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionJoinQueries.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.trino.plugin.hive; | ||
|
||
import io.trino.testing.AbstractTestFaultTolerantExecutionJoinQueries; | ||
import io.trino.testing.QueryRunner; | ||
import org.testng.annotations.Test; | ||
|
||
import java.util.Map; | ||
|
||
import static io.trino.tpch.TpchTable.getTables; | ||
|
||
public class TestHiveFaultTolerantExecutionJoinQueries | ||
extends AbstractTestFaultTolerantExecutionJoinQueries | ||
{ | ||
@Override | ||
protected QueryRunner createQueryRunner(Map<String, String> extraProperties) | ||
throws Exception | ||
{ | ||
return HiveQueryRunner.builder() | ||
.setExtraProperties(extraProperties) | ||
.setInitialTables(getTables()) | ||
.build(); | ||
} | ||
|
||
@Override | ||
@Test(enabled = false) | ||
public void testOutputDuplicatesInsensitiveJoin() | ||
{ | ||
// flaky | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...hive/src/test/java/io/trino/plugin/hive/TestHiveFaultTolerantExecutionOrderByQueries.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.trino.plugin.hive; | ||
|
||
import io.trino.testing.AbstractTestFaultTolerantExecutionOrderByQueries; | ||
import io.trino.testing.QueryRunner; | ||
|
||
import java.util.Map; | ||
|
||
import static io.trino.tpch.TpchTable.getTables; | ||
|
||
public class TestHiveFaultTolerantExecutionOrderByQueries | ||
extends AbstractTestFaultTolerantExecutionOrderByQueries | ||
{ | ||
@Override | ||
protected QueryRunner createQueryRunner(Map<String, String> extraProperties) | ||
throws Exception | ||
{ | ||
return HiveQueryRunner.builder() | ||
.setExtraProperties(extraProperties) | ||
.setInitialTables(getTables()) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.