Skip to content

Commit c3d1173

Browse files
alovewrobbinhan
authored andcommitted
Change break to continue (airbytehq#17015)
* Change break to continue
1 parent cccba11 commit c3d1173

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

airbyte-workers/src/main/java/io/airbyte/workers/temporal/sync/NormalizationSummaryCheckActivityImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public boolean shouldRunNormalization(final Long jobId, final Long attemptNumber
3535

3636
// if the count of committed records for this attempt is > 0 OR if it is null,
3737
// then we should run normalization
38-
if (numCommittedRecords.get() == null || numCommittedRecords.get() > 0) {
38+
if (numCommittedRecords.isEmpty() || numCommittedRecords.get() > 0) {
3939
return true;
4040
}
4141

airbyte-workers/src/main/java/io/airbyte/workers/temporal/sync/SyncWorkflowImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public StandardSyncOutput run(final JobRunConfig jobRunConfig,
7777
}
7878
if (!shouldRun) {
7979
LOGGER.info("Skipping normalization because there are no records to normalize.");
80-
break;
80+
continue;
8181
}
8282
}
8383

airbyte-workers/src/test/java/io/airbyte/workers/temporal/sync/SyncWorkflowTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ void testSkipNormalization() throws IOException {
300300
verifyReplication(replicationActivity, syncInput);
301301
verifyPersistState(persistStateActivity, sync, replicationSuccessOutputNoRecordsCommitted, syncInput.getCatalog());
302302
verifyNoInteractions(normalizationActivity);
303-
verifyNoInteractions(dbtTransformationActivity);
303+
verifyDbtTransform(dbtTransformationActivity, syncInput.getResourceRequirements(),
304+
operatorDbtInput);
304305
}
305306

306307
@SuppressWarnings("ResultOfMethodCallIgnored")

0 commit comments

Comments
 (0)