Skip to content

Commit 4e3c512

Browse files
committed
fix test
1 parent 4b92f46 commit 4e3c512

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

unit_tests/sources/declarative/incremental/test_concurrent_perpartitioncursor.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from airbyte_cdk.sources.declarative.schema import InlineSchemaLoader
2424
from airbyte_cdk.sources.declarative.stream_slicers.declarative_partition_generator import (
2525
DeclarativePartition,
26+
RecordCounter,
2627
)
2728
from airbyte_cdk.sources.streams.concurrent.cursor import CursorField
2829
from airbyte_cdk.sources.streams.concurrent.state_converters.datetime_stream_state_converter import (
@@ -3624,6 +3625,7 @@ def test_given_no_partitions_processed_when_close_partition_then_no_state_update
36243625
message_repository=MagicMock(),
36253626
max_records_limit=None,
36263627
stream_slice=slice,
3628+
record_counter=RecordCounter(),
36273629
)
36283630
)
36293631

@@ -3709,6 +3711,7 @@ def test_given_unfinished_first_parent_partition_no_parent_state_update():
37093711
message_repository=MagicMock(),
37103712
max_records_limit=None,
37113713
stream_slice=slice,
3714+
record_counter=RecordCounter(),
37123715
)
37133716
)
37143717
cursor.ensure_at_least_one_state_emitted()
@@ -3804,6 +3807,7 @@ def test_given_unfinished_last_parent_partition_with_partial_parent_state_update
38043807
message_repository=MagicMock(),
38053808
max_records_limit=None,
38063809
stream_slice=slice,
3810+
record_counter=RecordCounter(),
38073811
)
38083812
)
38093813
cursor.ensure_at_least_one_state_emitted()
@@ -3894,6 +3898,7 @@ def test_given_all_partitions_finished_when_close_partition_then_final_state_emi
38943898
message_repository=MagicMock(),
38953899
max_records_limit=None,
38963900
stream_slice=slice,
3901+
record_counter=RecordCounter(),
38973902
)
38983903
)
38993904

@@ -3968,6 +3973,7 @@ def test_given_partition_limit_exceeded_when_close_partition_then_switch_to_glob
39683973
message_repository=MagicMock(),
39693974
max_records_limit=None,
39703975
stream_slice=slice,
3976+
record_counter=RecordCounter(),
39713977
)
39723978
)
39733979
cursor.ensure_at_least_one_state_emitted()
@@ -4053,6 +4059,7 @@ def test_semaphore_cleanup():
40534059
message_repository=MagicMock(),
40544060
max_records_limit=None,
40554061
stream_slice=s,
4062+
record_counter=RecordCounter(),
40564063
)
40574064
)
40584065

@@ -4173,6 +4180,7 @@ def test_duplicate_partition_after_closing_partition_cursor_deleted():
41734180
message_repository=MagicMock(),
41744181
max_records_limit=None,
41754182
stream_slice=first_1,
4183+
record_counter=RecordCounter(),
41764184
)
41774185
)
41784186

@@ -4185,6 +4193,7 @@ def test_duplicate_partition_after_closing_partition_cursor_deleted():
41854193
message_repository=MagicMock(),
41864194
max_records_limit=None,
41874195
stream_slice=two,
4196+
record_counter=RecordCounter(),
41884197
)
41894198
)
41904199

@@ -4197,6 +4206,7 @@ def test_duplicate_partition_after_closing_partition_cursor_deleted():
41974206
message_repository=MagicMock(),
41984207
max_records_limit=None,
41994208
stream_slice=second_1,
4209+
record_counter=RecordCounter(),
42004210
)
42014211
)
42024212

@@ -4258,6 +4268,7 @@ def test_duplicate_partition_after_closing_partition_cursor_exists():
42584268
message_repository=MagicMock(),
42594269
max_records_limit=None,
42604270
stream_slice=first_1,
4271+
record_counter=RecordCounter(),
42614272
)
42624273
)
42634274

@@ -4270,6 +4281,7 @@ def test_duplicate_partition_after_closing_partition_cursor_exists():
42704281
message_repository=MagicMock(),
42714282
max_records_limit=None,
42724283
stream_slice=two,
4284+
record_counter=RecordCounter(),
42734285
)
42744286
)
42754287

@@ -4283,6 +4295,7 @@ def test_duplicate_partition_after_closing_partition_cursor_exists():
42834295
message_repository=MagicMock(),
42844296
max_records_limit=None,
42854297
stream_slice=second_1,
4298+
record_counter=RecordCounter(),
42864299
)
42874300
)
42884301

@@ -4341,6 +4354,7 @@ def test_duplicate_partition_while_processing():
43414354
message_repository=MagicMock(),
43424355
max_records_limit=None,
43434356
stream_slice=generated[1],
4357+
record_counter=RecordCounter(),
43444358
)
43454359
)
43464360
# Now close the initial “1”
@@ -4352,6 +4366,7 @@ def test_duplicate_partition_while_processing():
43524366
message_repository=MagicMock(),
43534367
max_records_limit=None,
43544368
stream_slice=generated[0],
4369+
record_counter=RecordCounter(),
43554370
)
43564371
)
43574372

0 commit comments

Comments
 (0)