Skip to content

Commit

Permalink
Remove redundant method exclusion from test
Browse files Browse the repository at this point in the history
The test allowed `CachingJdbcClient` not to implement `schemaExists`,
but the method is implemented.
  • Loading branch information
findepi committed Nov 26, 2021
1 parent 5c98059 commit 84ee460
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.google.common.cache.CacheStats;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import io.airlift.units.Duration;
import io.trino.plugin.base.session.SessionPropertiesProvider;
import io.trino.plugin.jdbc.credential.ExtraCredentialConfig;
Expand All @@ -36,7 +35,6 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import java.lang.reflect.Method;
import java.util.List;
import java.util.Optional;
import java.util.OptionalLong;
Expand Down Expand Up @@ -632,19 +630,7 @@ private static ConnectorSession createUserSession(String userName)
@Test
public void testEverythingImplemented()
{
assertAllMethodsOverridden(JdbcClient.class, CachingJdbcClient.class, nonOverriddenMethods());
}

private static Set<Method> nonOverriddenMethods()
{
try {
return ImmutableSet.<Method>builder()
.add(JdbcClient.class.getMethod("schemaExists", ConnectorSession.class, String.class))
.build();
}
catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
assertAllMethodsOverridden(JdbcClient.class, CachingJdbcClient.class);
}

private static CacheStatsAssertions assertTableNamesCache(CachingJdbcClient cachingJdbcClient)
Expand Down

0 comments on commit 84ee460

Please sign in to comment.