Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion plugin/trino-redshift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
<exclude>**/TestRedshiftTableStatisticsReader.java</exclude>
<exclude>**/TestRedshiftTypeMapping.java</exclude>
<exclude>**/Test*FailureRecoveryTest.java</exclude>
<exclude>**/Test*FailureRecoverySmokeTest.java</exclude>
Comment thread
findinpath marked this conversation as resolved.
Outdated
</excludes>
</configuration>
</plugin>
Expand Down Expand Up @@ -251,7 +252,10 @@
<!-- Failure recovery tests spend most of the time waiting for a retry -->
<threadCount>4</threadCount>
<includes>
<include>**/Test*FailureRecoveryTest.java</include>
<!-- Run only the smoke tests of the connector for the fault-tolerant execution functionality -->
<!-- on the CI environment due to unpredictable locations of GitHub runners which can lead -->
<!-- to increased client latency on the JDBC operations performed on the ephemeral AWS Redshift cluster. -->
<include>**/Test*FailureRecoverySmokeTest.java</include>
</includes>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* 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.redshift;

import io.trino.operator.RetryPolicy;
import org.testng.annotations.DataProvider;

import java.util.Optional;

import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_GET_RESULTS_REQUEST_FAILURE;

public class TestRedshiftQueryFailureRecoverySmokeTest
extends BaseRedshiftFailureRecoveryTest
{
public TestRedshiftQueryFailureRecoverySmokeTest()
{
super(RetryPolicy.QUERY);
}

@Override
@DataProvider(name = "parallelTests", parallel = true)
public Object[][] parallelTests()
{
// Skip the regular FTE tests to execute the smoke test faster
return new Object[][] {
parallelTest("testCreateTableAsSelect", this::testCreateTableAsSelect),
};
}

private void testCreateTableAsSelect()
{
assertThatQuery("CREATE TABLE <table> AS SELECT * FROM orders")
.withCleanupQuery(Optional.of("DROP TABLE <table>"))
.experiencing(TASK_GET_RESULTS_REQUEST_FAILURE)
.at(boundaryDistributedStage())
.failsWithoutRetries(failure -> failure.hasMessageFindingMatch("Error 500 Internal Server Error|Error closing remote buffer, expected 204 got 500"))
.finishesSuccessfully()
.cleansUpTemporaryTables();
}
}