From 18796a0a176d93732119952907deaf4a98a0c1b5 Mon Sep 17 00:00:00 2001 From: Martin Traverso Date: Mon, 9 Oct 2023 13:46:57 -0700 Subject: [PATCH] Move method to BaseConnectorTest It only applies to TestNG tests and it's only used by connector tests --- .../java/io/trino/testing/AbstractTestQueryFramework.java | 8 -------- .../src/main/java/io/trino/testing/BaseConnectorTest.java | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java index 92f3806b671f..e7b83f68092a 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java @@ -58,7 +58,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import org.testng.SkipException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -631,13 +630,6 @@ protected String getGraphvizExplainPlan(@Language("SQL") String query, ExplainTy }); } - protected static void skipTestUnless(boolean requirement) - { - if (!requirement) { - throw new SkipException("requirement not met"); - } - } - protected final QueryRunner getQueryRunner() { checkState(queryRunner != null, "queryRunner not set"); diff --git a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java index 08061c6ced48..7768f450d377 100644 --- a/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java +++ b/testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java @@ -6499,6 +6499,13 @@ public void testProjectionPushdownPhysicalInputSize() } } + protected static void skipTestUnless(boolean requirement) + { + if (!requirement) { + throw new SkipException("requirement not met"); + } + } + protected Consumer assertPartialLimitWithPreSortedInputsCount(Session session, int expectedCount) { return plan -> {