Skip to content

Commit 7bec349

Browse files
committed
Improve accuracy of simulated records
1 parent b6043f4 commit 7bec349

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,17 @@ def generate_sample_records_with_simulated_partitions(
4343
run_dates = ["2024-01-01", "2024-06-15", "2024-12-31"]
4444
run_types = ["full", "daily"]
4545
actions = ["index", "delete"]
46-
run_ids = [str(uuid.uuid4()) for x in range(num_run_ids)]
4746

4847
records_remaining = num_records
4948
while records_remaining > 0:
5049
batch_size = random.randint(1, min(100, records_remaining))
50+
source = random.choice(sources)
5151
yield from generate_sample_records(
5252
num_records=batch_size,
53-
timdex_record_id_prefix=random.choice(sources),
54-
source=random.choice(sources),
53+
timdex_record_id_prefix=source,
54+
source=source,
5555
run_date=random.choice(run_dates),
5656
run_type=random.choice(run_types),
5757
action=random.choice(actions),
58-
run_id=random.choice(run_ids),
5958
)
6059
records_remaining -= batch_size

0 commit comments

Comments
 (0)