From 1b50fb7c7be0f0d1817fcebc01f1ec948d609b8f Mon Sep 17 00:00:00 2001 From: Stephane Geneix Date: Sat, 17 Feb 2024 05:15:53 -0800 Subject: [PATCH] disable all passing source-mssql tests --- .../integrations/debezium/CdcSourceTest.java | 29 ++++++++++--------- .../SshKeyMssqlSourceAcceptanceTest.java | 2 ++ .../SshPasswordMssqlSourceAcceptanceTest.java | 2 ++ .../source/mssql/CdcMssqlSourceTest.java | 14 ++++----- .../source/mssql/CdcMssqlSslSourceTest.java | 2 ++ .../source/mssql/CdcStateCompressionTest.java | 2 ++ .../mssql/CloudDeploymentMssqlTest.java | 2 ++ .../source/mssql/MssqlCdcHelperTest.java | 2 ++ .../mssql/MssqlDataSourceFactoryTest.java | 2 ++ .../mssql/MssqlDebeziumStateUtilTest.java | 2 ++ .../mssql/MssqlInitialLoadHandlerTest.java | 2 ++ .../source/mssql/MssqlSourceTest.java | 1 + .../source/mssql/MssqlSslSourceTest.java | 2 ++ 13 files changed, 43 insertions(+), 21 deletions(-) diff --git a/airbyte-cdk/java/airbyte-cdk/db-sources/src/testFixtures/java/io/airbyte/cdk/integrations/debezium/CdcSourceTest.java b/airbyte-cdk/java/airbyte-cdk/db-sources/src/testFixtures/java/io/airbyte/cdk/integrations/debezium/CdcSourceTest.java index aa9f161a7bae..23cfed118197 100644 --- a/airbyte-cdk/java/airbyte-cdk/db-sources/src/testFixtures/java/io/airbyte/cdk/integrations/debezium/CdcSourceTest.java +++ b/airbyte-cdk/java/airbyte-cdk/db-sources/src/testFixtures/java/io/airbyte/cdk/integrations/debezium/CdcSourceTest.java @@ -325,8 +325,8 @@ protected void assertExpectedRecords(final Set expectedRecords, assertEquals(expectedRecords, actualData); } - //@Test - //On the first sync, produce returns records that exist in the database. + // @Test + // On the first sync, produce returns records that exist in the database. void testExistingData() throws Exception { final CdcTargetPosition targetPosition = cdcLatestTargetPosition(); final AutoCloseableIterator read = source().read(config(), getConfiguredCatalog(), null); @@ -349,8 +349,8 @@ protected void compareTargetPositionFromTheRecordsWithTargetPostionGeneratedBefo assertEquals(extractPosition(record.getData()), targetPosition); } - //@Test - //When a record is deleted, produces a deletion record. + // @Test + // When a record is deleted, produces a deletion record. void testDelete() throws Exception { final AutoCloseableIterator read1 = source() .read(config(), getConfiguredCatalog(), null); @@ -377,8 +377,8 @@ protected void assertExpectedStateMessagesFromIncrementalSync(final List read1 = source() @@ -471,8 +471,9 @@ protected void assertExpectedStateMessagesForRecordsProducedDuringAndAfterSync(f assertExpectedStateMessages(stateAfterFirstBatch); } - //@Test - //When both incremental CDC and full refresh are configured for different streams in a sync, the data is replicated as expected. + // @Test + // When both incremental CDC and full refresh are configured for different streams in a sync, the + // data is replicated as expected. void testCdcAndFullRefreshInSameSync() throws Exception { final ConfiguredAirbyteCatalog configuredCatalog = Jsons.clone(getConfiguredCatalog()); @@ -544,8 +545,8 @@ void testCdcAndFullRefreshInSameSync() throws Exception { modelsSchema()); } - //@Test - //When no records exist, no records are returned. + // @Test + // When no records exist, no records are returned. void testNoData() throws Exception { deleteCommand(MODELS_STREAM_NAME); @@ -562,8 +563,8 @@ protected void assertExpectedStateMessagesForNoData(final List read1 = source() .read(config(), getConfiguredCatalog(), null); @@ -587,7 +588,7 @@ void testCheck() throws Exception { assertEquals(status.getStatus(), AirbyteConnectionStatus.Status.SUCCEEDED); } - //@Test + // @Test void testDiscover() throws Exception { final AirbyteCatalog expectedCatalog = expectedCatalogForDiscover(); final AirbyteCatalog actualCatalog = source().discover(config()); @@ -599,7 +600,7 @@ void testDiscover() throws Exception { .collect(Collectors.toList())); } - //@Test + // @Test public void newTableSnapshotTest() throws Exception { final AutoCloseableIterator firstBatchIterator = source() .read(config(), getConfiguredCatalog(), null); diff --git a/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshKeyMssqlSourceAcceptanceTest.java b/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshKeyMssqlSourceAcceptanceTest.java index 4990c606952a..276bcc7ee804 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshKeyMssqlSourceAcceptanceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshKeyMssqlSourceAcceptanceTest.java @@ -5,7 +5,9 @@ package io.airbyte.integrations.source.mssql; import io.airbyte.cdk.integrations.base.ssh.SshTunnel.TunnelMethod; +import org.junit.jupiter.api.Disabled; +@Disabled public class SshKeyMssqlSourceAcceptanceTest extends AbstractSshMssqlSourceAcceptanceTest { @Override diff --git a/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshPasswordMssqlSourceAcceptanceTest.java b/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshPasswordMssqlSourceAcceptanceTest.java index 35b0b57bf6f8..61b015fc538a 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshPasswordMssqlSourceAcceptanceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test-integration/java/io/airbyte/integrations/source/mssql/SshPasswordMssqlSourceAcceptanceTest.java @@ -5,7 +5,9 @@ package io.airbyte.integrations.source.mssql; import io.airbyte.cdk.integrations.base.ssh.SshTunnel.TunnelMethod; +import org.junit.jupiter.api.Disabled; +@Disabled public class SshPasswordMssqlSourceAcceptanceTest extends AbstractSshMssqlSourceAcceptanceTest { @Override diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSourceTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSourceTest.java index eecfdd0db7d0..0d6036ad726e 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSourceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSourceTest.java @@ -198,7 +198,7 @@ public void newTableSnapshotTest() { } // Utilize the setup to do test on MssqlDebeziumStateUtil. - //@Test + // @Test public void testCdcSnapshot() { MssqlDebeziumStateUtil util = new MssqlDebeziumStateUtil(); @@ -219,7 +219,7 @@ public void testCdcSnapshot() { // Tests even with consistent inserting operations, CDC snapshot and incremental load will not lose // data. - //@Test + // @Test public void testCdcNotLoseDataWithConsistentWriting() throws Exception { ExecutorService executor = Executors.newFixedThreadPool(10); @@ -280,7 +280,7 @@ protected String columnClause(final Map columnsWithDataType, fin return columnClause.toString(); } - //@Test + // @Test void testAssertCdcEnabledInDb() { // since we enable cdc in setup, assert that we successfully pass this first assertDoesNotThrow(() -> source().assertCdcEnabledInDb(config(), testDatabase())); @@ -289,7 +289,7 @@ void testAssertCdcEnabledInDb() { assertThrows(RuntimeException.class, () -> source().assertCdcEnabledInDb(config(), testDatabase())); } - //@Test + // @Test void testAssertCdcSchemaQueryable() { // correct access granted by setup so assert check passes assertDoesNotThrow(() -> source().assertCdcSchemaQueryable(config(), testDatabase())); @@ -311,7 +311,7 @@ void testAssertSqlServerAgentRunning() { // Ensure the CDC check operations are included when CDC is enabled // todo: make this better by checking the returned checkOperations from source.getCheckOperations - //@Test + // @Test void testCdcCheckOperations() throws Exception { // assertCdcEnabledInDb testdb.withoutCdc(); @@ -334,7 +334,7 @@ void testCdcCheckOperations() throws Exception { assertEquals(status.getStatus(), AirbyteConnectionStatus.Status.FAILED); } - //@Test + // @Test void testCdcCheckOperationsWithDot() throws Exception { final String dbNameWithDot = testdb.getDatabaseName().replace("_", "."); testdb.with("CREATE DATABASE [%s];", dbNameWithDot) @@ -346,7 +346,7 @@ void testCdcCheckOperationsWithDot() throws Exception { // todo: check LSN returned is actually the max LSN // todo: check we fail as expected under certain conditions - //@Test + // @Test void testGetTargetPosition() { // check that getTargetPosition returns higher Lsn after inserting new row testdb.withWaitUntilMaxLsnAvailable(); diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSslSourceTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSslSourceTest.java index f0f869eb686f..97134cc489cf 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSslSourceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcMssqlSslSourceTest.java @@ -15,10 +15,12 @@ import java.net.UnknownHostException; import java.util.Map; import javax.sql.DataSource; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.TestInstance; import org.testcontainers.containers.MSSQLServerContainer; @TestInstance(TestInstance.Lifecycle.PER_CLASS) +@Disabled public class CdcMssqlSslSourceTest extends CdcMssqlSourceTest { @Override diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcStateCompressionTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcStateCompressionTest.java index 293189b6683a..c82ee846e96a 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcStateCompressionTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CdcStateCompressionTest.java @@ -39,8 +39,10 @@ import java.util.stream.Collectors; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +@Disabled public class CdcStateCompressionTest { static private final String CDC_ROLE_NAME = "cdc_selector"; diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CloudDeploymentMssqlTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CloudDeploymentMssqlTest.java index 1889315bea6f..632afb5a1c1a 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CloudDeploymentMssqlTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/CloudDeploymentMssqlTest.java @@ -15,11 +15,13 @@ import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlagsWrapper; import io.airbyte.protocol.models.v0.AirbyteConnectionStatus; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; @Execution(ExecutionMode.CONCURRENT) +@Disabled public class CloudDeploymentMssqlTest { private MsSQLTestDatabase createTestDatabase(String... containerFactoryMethods) { diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlCdcHelperTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlCdcHelperTest.java index d1ec53fe1915..2aa68269d5cb 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlCdcHelperTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlCdcHelperTest.java @@ -10,8 +10,10 @@ import com.fasterxml.jackson.databind.JsonNode; import io.airbyte.commons.json.Jsons; import java.util.Map; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +@Disabled class MssqlCdcHelperTest { private static final JsonNode LEGACY_NON_CDC_CONFIG = Jsons.jsonNode(Map.of("replication_method", "STANDARD")); diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDataSourceFactoryTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDataSourceFactoryTest.java index 64d2fae404d2..d3fb5878e164 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDataSourceFactoryTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDataSourceFactoryTest.java @@ -11,8 +11,10 @@ import io.airbyte.cdk.db.factory.DataSourceFactory; import java.util.Map; import javax.sql.DataSource; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +@Disabled public class MssqlDataSourceFactoryTest { @Test diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDebeziumStateUtilTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDebeziumStateUtilTest.java index ceddd2b9268d..ecd079d8f79c 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDebeziumStateUtilTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlDebeziumStateUtilTest.java @@ -10,8 +10,10 @@ import io.airbyte.integrations.source.mssql.cdc.MssqlDebeziumStateUtil; import io.airbyte.integrations.source.mssql.cdc.MssqlDebeziumStateUtil.MssqlDebeziumStateAttributes; import io.debezium.connector.sqlserver.Lsn; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +@Disabled public class MssqlDebeziumStateUtilTest { private static String DB_NAME = "db_name"; diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlInitialLoadHandlerTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlInitialLoadHandlerTest.java index 9693bb6cd563..77b950dba487 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlInitialLoadHandlerTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlInitialLoadHandlerTest.java @@ -9,8 +9,10 @@ import io.airbyte.integrations.source.mssql.MssqlQueryUtils.TableSizeInfo; import io.airbyte.integrations.source.mssql.initialsync.MssqlInitialLoadHandler; import io.airbyte.protocol.models.AirbyteStreamNameNamespacePair; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +@Disabled public class MssqlInitialLoadHandlerTest { private static final long ONE_GB = 1_073_741_824; diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSourceTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSourceTest.java index 098ebab0ef41..636f33909cb2 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSourceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSourceTest.java @@ -25,6 +25,7 @@ import java.util.List; import org.junit.jupiter.api.*; +@Disabled class MssqlSourceTest { private static final String STREAM_NAME = "id_and_name"; diff --git a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSslSourceTest.java b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSslSourceTest.java index 3b45cb7e8210..fd979dfd7c36 100644 --- a/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSslSourceTest.java +++ b/airbyte-integrations/connectors/source-mssql/src/test/java/io/airbyte/integrations/source/mssql/MssqlSslSourceTest.java @@ -17,11 +17,13 @@ import java.util.Map; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Disabled public class MssqlSslSourceTest { private MsSQLTestDatabase testDb;