Skip to content

Commit

Permalink
Remove unused product test groups
Browse files Browse the repository at this point in the history
Remove product test groups that are not used by any tests. These are
meaningless. They do not need to be defined pro actively.
  • Loading branch information
findepi committed Jan 12, 2024
1 parent 81771c3 commit fdb8101
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public final class TestGroups
public static final String DELTA_LAKE_DATABRICKS_113 = "delta-lake-databricks-113";
public static final String DELTA_LAKE_DATABRICKS_122 = "delta-lake-databricks-122";
public static final String DELTA_LAKE_EXCLUDE_91 = "delta-lake-exclude-91";
public static final String DELTA_LAKE_EXCLUDE_133 = "delta-lake-exclude-133";
public static final String HUDI = "hudi";
public static final String PARQUET = "parquet";
public static final String IGNITE = "ignite";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import static io.trino.tests.product.TestGroups.CONFIGURED_FEATURES;
import static io.trino.tests.product.TestGroups.DELTA_LAKE_DATABRICKS;
import static io.trino.tests.product.TestGroups.DELTA_LAKE_EXCLUDE_133;
import static io.trino.tests.product.launcher.suite.SuiteTestRun.testOnEnvironment;

public class SuiteDeltaLakeDatabricks133
Expand All @@ -35,7 +34,6 @@ public List<SuiteTestRun> getTestRuns(EnvironmentConfig config)
return ImmutableList.of(
testOnEnvironment(EnvSinglenodeDeltaLakeDatabricks133.class)
.withGroups(CONFIGURED_FEATURES, DELTA_LAKE_DATABRICKS)
.withExcludedGroups(DELTA_LAKE_EXCLUDE_133)
.withExcludedTests(getExcludedTests())
.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ public void selfTest()
.isEmpty();
}

@Test
public void testAllGroupsUsed()
throws Exception
{
Set<String> definedGroups = definedTestGroups();
Set<String> usedGroups = productTests()
.flatMap(test -> test.groups().stream())
.collect(toImmutableSet());

assertThat(difference(definedGroups, usedGroups)).as("All groups defined by TestGroups should be used in product tests")
.isEmpty();
}

@Test
public void testGroupsReasonable()
throws Exception
Expand Down

0 comments on commit fdb8101

Please sign in to comment.