Skip to content

Commit

Permalink
disable all passing source-mssql tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-airbyte committed Feb 23, 2024
1 parent 0ac21c4 commit 1b50fb7
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ protected void assertExpectedRecords(final Set<JsonNode> 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<AirbyteMessage> read = source().read(config(), getConfiguredCatalog(), null);
Expand All @@ -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<AirbyteMessage> read1 = source()
.read(config(), getConfiguredCatalog(), null);
Expand All @@ -377,8 +377,8 @@ protected void assertExpectedStateMessagesFromIncrementalSync(final List<Airbyte
assertExpectedStateMessages(stateMessages);
}

//@Test
//When a record is updated, produces an update record.
// @Test
// When a record is updated, produces an update record.
void testUpdate() throws Exception {
final String updatedModel = "Explorer";
final AutoCloseableIterator<AirbyteMessage> read1 = source()
Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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);
Expand All @@ -562,8 +563,8 @@ protected void assertExpectedStateMessagesForNoData(final List<AirbyteStateMessa
assertExpectedStateMessages(stateMessages);
}

//@Test
//When no changes have been made to the database since the previous sync, no records are returned.
// @Test
// When no changes have been made to the database since the previous sync, no records are returned.
void testNoDataOnSecondSync() throws Exception {
final AutoCloseableIterator<AirbyteMessage> read1 = source()
.read(config(), getConfiguredCatalog(), null);
Expand All @@ -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());
Expand All @@ -599,7 +600,7 @@ void testDiscover() throws Exception {
.collect(Collectors.toList()));
}

//@Test
// @Test
public void newTableSnapshotTest() throws Exception {
final AutoCloseableIterator<AirbyteMessage> firstBatchIterator = source()
.read(config(), getConfiguredCatalog(), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void newTableSnapshotTest() {
}

// Utilize the setup to do test on MssqlDebeziumStateUtil.
//@Test
// @Test
public void testCdcSnapshot() {
MssqlDebeziumStateUtil util = new MssqlDebeziumStateUtil();

Expand All @@ -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);

Expand Down Expand Up @@ -280,7 +280,7 @@ protected String columnClause(final Map<String, String> 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()));
Expand All @@ -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()));
Expand All @@ -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();
Expand All @@ -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)
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1b50fb7

Please sign in to comment.