Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ignite schema change operation tests failure #17102

Merged
merged 1 commit into from
May 16, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import io.trino.testing.TestingConnectorBehavior;
import io.trino.testing.sql.SqlExecutor;
import io.trino.testing.sql.TestTable;
import io.trino.testng.services.Flaky;
import org.intellij.lang.annotations.Language;
import org.testng.SkipException;
import org.testng.annotations.Test;

Expand All @@ -37,6 +39,10 @@
public class TestIgniteConnectorTest
extends BaseJdbcConnectorTest
{
private static final String SCHEMA_CHANGE_OPERATION_FAIL_ISSUE = "https://github.com/trinodb/trino/issues/14391";
@Language("RegExp")
private static final String SCHEMA_CHANGE_OPERATION_FAIL_MATCH = "Schema change operation failed: Thread got interrupted while trying to acquire table lock.";

private TestingIgniteServer igniteServer;

@Override
Expand Down Expand Up @@ -317,7 +323,9 @@ protected void verifyConcurrentAddColumnFailurePermissible(Exception e)
assertThat(e).hasMessage("Schema change operation failed: Thread got interrupted while trying to acquire table lock.");
}

@Test
@Override
@Flaky(issue = SCHEMA_CHANGE_OPERATION_FAIL_ISSUE, match = SCHEMA_CHANGE_OPERATION_FAIL_MATCH)
public void testDropAndAddColumnWithSameName()
{
// Override because Ignite can access old data after dropping and adding a column with same name
Expand All @@ -330,6 +338,38 @@ public void testDropAndAddColumnWithSameName()
}
}

@Test
@Override
@Flaky(issue = SCHEMA_CHANGE_OPERATION_FAIL_ISSUE, match = SCHEMA_CHANGE_OPERATION_FAIL_MATCH)
public void testAddColumn()
{
super.testAddColumn();
}

@Test
@Override
@Flaky(issue = SCHEMA_CHANGE_OPERATION_FAIL_ISSUE, match = SCHEMA_CHANGE_OPERATION_FAIL_MATCH)
public void testDropColumn()
{
super.testDropColumn();
}

@Test
@Override
@Flaky(issue = SCHEMA_CHANGE_OPERATION_FAIL_ISSUE, match = SCHEMA_CHANGE_OPERATION_FAIL_MATCH)
public void testAlterTableAddLongColumnName()
{
super.testAlterTableAddLongColumnName();
}

@Test(dataProvider = "testColumnNameDataProvider")
@Override
@Flaky(issue = SCHEMA_CHANGE_OPERATION_FAIL_ISSUE, match = SCHEMA_CHANGE_OPERATION_FAIL_MATCH)
public void testAddAndDropColumnName(String columnName)
{
super.testAddAndDropColumnName(columnName);
}

@Override
protected TestTable simpleTable()
{
Expand Down