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 flaky TestCassandraConnectorTest #21696

Merged
merged 1 commit into from
Apr 25, 2024
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 @@ -222,6 +222,13 @@ public void testCharVarcharComparison()
.hasMessage("Unsupported type: char(3)");
}

@Test
@Override // Override because some tests (e.g. testKeyspaceNameAmbiguity) cause table listing failure
public void testShowInformationSchemaTables()
{
executeExclusively(super::testShowInformationSchemaTables);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

@Test
@Override // Override because some tests (e.g. testKeyspaceNameAmbiguity, testNativeQueryCaseSensitivity) cause column listing failure
public void testSelectInformationSchemaColumns()
Expand Down Expand Up @@ -958,6 +965,9 @@ public void testKeyspaceNameAmbiguity()

session.execute("DROP KEYSPACE \"KeYsPaCe_3\"");
session.execute("DROP KEYSPACE \"kEySpAcE_3\"");
// Wait until the schema becomes invisible to Trino. Otherwise, testSelectInformationSchemaColumns may fail due to ambiguous schema names.
assertEventually(() -> assertThat(computeActual("SHOW SCHEMAS FROM cassandra").getOnlyColumnAsSet())
.doesNotContain("keyspace_3"));
}

@Test
Expand Down Expand Up @@ -1479,6 +1489,8 @@ public void testNativeQueryCaseSensitivity()
"VALUES (1, 2)");

onCassandra("DROP TABLE tpch." + tableName);
// Wait until the table becomes invisible to Trino. Otherwise, testSelectInformationSchemaColumns may fail due to ambiguous column names.
assertEventually(() -> assertThat(getQueryRunner().tableExists(getSession(), tableName)).isFalse());
}

@Test
Expand Down