Skip to content

Commit 05c082c

Browse files
committed
update property name and add simple test
1 parent eb2c245 commit 05c082c

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ properties:
4242
"$ref": "#/definitions/ConcurrencyLevel"
4343
api_budget:
4444
"$ref": "#/definitions/HTTPAPIBudget"
45-
max_concurrent_job_count:
45+
max_concurrent_async_job_count:
4646
title: Maximum Concurrent Async Jobs
4747
description: Maximum number of concurrent async jobs to run. This property is only relevant for sources/streams that support asynchronous job execution (e.g. a Report stream that requires that initiates a job, polls the job status, and then fetches the job results). This is often set by the API's maximum number of concurrent jobs on the account level.
4848
type: integer

airbyte_cdk/sources/declarative/manifest_declarative_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(
9595
if component_factory
9696
else ModelToComponentFactory(
9797
emit_connector_builder_messages,
98-
max_concurrent_async_job_count=source_config.get("max_concurrent_job_count"),
98+
max_concurrent_async_job_count=source_config.get("max_concurrent_async_job_count"),
9999
)
100100
)
101101
self._message_repository = self._constructor.get_message_repository()

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,7 @@ class Config:
18711871
spec: Optional[Spec] = None
18721872
concurrency_level: Optional[ConcurrencyLevel] = None
18731873
api_budget: Optional[HTTPAPIBudget] = None
1874-
max_concurrent_job_count: Optional[int] = Field(
1874+
max_concurrent_async_job_count: Optional[int] = Field(
18751875
None,
18761876
description="Maximum number of concurrent async jobs to run. This property is only relevant for sources/streams that support asynchronous job execution (e.g. a Report stream that requires that initiates a job, polls the job status, and then fetches the job results). This is often set by the API's maximum number of concurrent jobs on the account level.",
18771877
title="Maximum Concurrent Async Jobs",
@@ -1903,7 +1903,7 @@ class Config:
19031903
spec: Optional[Spec] = None
19041904
concurrency_level: Optional[ConcurrencyLevel] = None
19051905
api_budget: Optional[HTTPAPIBudget] = None
1906-
max_concurrent_job_count: Optional[int] = Field(
1906+
max_concurrent_async_job_count: Optional[int] = Field(
19071907
None,
19081908
description="Maximum number of concurrent async jobs to run. This property is only relevant for sources/streams that support asynchronous job execution (e.g. a Report stream that requires that initiates a job, polls the job status, and then fetches the job results). This is often set by the API's maximum number of concurrent jobs on the account level.",
19091909
title="Maximum Concurrent Async Jobs",

unit_tests/sources/declarative/async_job/test_job_tracker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ def test_given_limit_reached_when_add_job_then_limit_is_still_reached(self) -> N
3939

4040
def _reach_limit(self) -> List[str]:
4141
return [self._tracker.try_to_get_intent() for i in range(_LIMIT)]
42+
43+
44+
@pytest.mark.parametrize("limit", [-1, 0])
45+
def test_given_limit_is_less_than_1_when_init_then_set_to_1(limit: int):
46+
tracker = JobTracker(limit)
47+
assert tracker._limit == 1

0 commit comments

Comments
 (0)