Skip to content

Commit

Permalink
Fix if statement for checking random amount of records
Browse files Browse the repository at this point in the history
  • Loading branch information
pflooky committed Jul 9, 2024
1 parent ce4e7fc commit 42ed765
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class BatchDataProcessor(connectionConfigsByName: Map[String, Map[String, String
}

//if random amount of records, don't try to regenerate more records
if (s.count.generator.isEmpty && s.count.perColumn.exists(_.generator.isEmpty)) {
if (s.count.generator.isEmpty && s.count.perColumn.forall(_.generator.isEmpty)) {
while (targetNumRecords != dfRecordCount && retries < maxRetries) {
retries += 1
generateAdditionalRecords()
Expand All @@ -79,6 +79,8 @@ class BatchDataProcessor(connectionConfigsByName: Map[String, Map[String, String
s"Can be due to limited number of potential unique records, " +
s"target-num-records=$targetNumRecords, actual-num-records=${dfRecordCount}")
}
} else {
LOGGER.debug("Random amount of records generated, not attempting to generate more records")
}

trackRecordsPerStep = trackRecordsPerStep ++ Map(recordStepName -> stepRecords.copy(currentNumRecords = dfRecordCount))
Expand Down

0 comments on commit 42ed765

Please sign in to comment.