Skip to content

Commit

Permalink
Fix Ignite schema change operation tests failure
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjian2664 authored and kokosing committed May 16, 2023
1 parent c999795 commit 416dada
Showing 1 changed file with 40 additions and 0 deletions.
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

0 comments on commit 416dada

Please sign in to comment.