diff --git a/src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergTableSchemaValidatorIT.java b/src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergTableSchemaValidatorIT.java index 249bde3c6..abc8bca8e 100644 --- a/src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergTableSchemaValidatorIT.java +++ b/src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergTableSchemaValidatorIT.java @@ -3,6 +3,7 @@ import com.snowflake.kafka.connector.internal.TestUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -10,11 +11,17 @@ public class IcebergTableSchemaValidatorIT extends BaseIcebergIT { private static final String TEST_ROLE = "testrole_kafka"; - private static final IcebergTableSchemaValidator schemaValidator = - new IcebergTableSchemaValidator(conn); + private static IcebergTableSchemaValidator schemaValidator; private String tableName; + @BeforeAll + // overrides the base class @BeforeAll + public static void setup() { + conn = TestUtils.getConnectionServiceForStreaming(); + schemaValidator = new IcebergTableSchemaValidator(conn); + } + @BeforeEach public void setUp() { tableName = TestUtils.randomTableName();