1
0
mirror of synced 2025-12-25 02:09:19 -05:00

db-sources: disable counts for state messages for FULL_REFRESH streams (#38208)

Co-authored-by: Xiaohan Song <xiaohan@airbyte.io>
This commit is contained in:
Subodh Kant Chaturvedi
2024-05-15 23:45:26 +05:30
committed by GitHub
parent e19e63421f
commit 073b94062c
15 changed files with 92 additions and 69 deletions

View File

@@ -6,7 +6,7 @@ plugins {
}
airbyteJavaConnector {
cdkVersionRequired = '0.35.2'
cdkVersionRequired = '0.35.4'
features = ['db-sources']
useLocalCdk = false
}

View File

@@ -9,7 +9,7 @@ data:
connectorSubtype: database
connectorType: source
definitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad
dockerImageTag: 3.4.3
dockerImageTag: 3.4.4
dockerRepository: airbyte/source-mysql
documentationUrl: https://docs.airbyte.com/integrations/sources/mysql
githubIssueLabel: source-mysql

View File

@@ -74,6 +74,7 @@ import java.util.Properties;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
@@ -92,6 +93,13 @@ public class CdcMysqlSourceTest extends CdcSourceTest<MySqlSource, MySQLTestData
private static final List<JsonNode> DATE_TIME_RECORDS = ImmutableList.of(
Jsons.jsonNode(ImmutableMap.of(COL_ID, 120, COL_DATE_TIME, "'2023-00-00 20:37:47'")));
@Override
protected void assertExpectedStateMessageCountMatches(final List<? extends AirbyteStateMessage> stateMessages, long totalCount) {
AtomicLong count = new AtomicLong(0L);
stateMessages.stream().forEach(stateMessage -> count.addAndGet(stateMessage.getSourceStats().getRecordCount().longValue()));
assertEquals(totalCount, count.get());
}
@Override
protected MySQLTestDatabase createTestDatabase() {
return MySQLTestDatabase.in(BaseImage.MYSQL_8, ContainerModifier.INVALID_TIMEZONE_CEST).withCdcPermissions();