Skip to content

Commit 22607ef

Browse files
committed
turn off caching in test which yields response from another test
1 parent 15d0648 commit 22607ef

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

unit_tests/sources/declarative/schema/test_dynamic_schema_loader.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
from airbyte_cdk.sources.declarative.concurrent_declarative_source import (
1212
ConcurrentDeclarativeSource,
1313
)
14+
from airbyte_cdk.sources.declarative.parsers.model_to_component_factory import (
15+
ModelToComponentFactory,
16+
)
1417
from airbyte_cdk.sources.declarative.schema import DynamicSchemaLoader, SchemaTypeIdentifier
1518
from airbyte_cdk.test.mock_http import HttpMocker, HttpRequest, HttpResponse
1619

@@ -347,7 +350,13 @@ def test_dynamic_schema_loader_with_type_conditions():
347350
},
348351
}
349352
source = ConcurrentDeclarativeSource(
350-
source_config=_MANIFEST_WITH_TYPE_CONDITIONS, config=_CONFIG, catalog=None, state=None
353+
source_config=_MANIFEST_WITH_TYPE_CONDITIONS,
354+
config=_CONFIG,
355+
catalog=None,
356+
state=None,
357+
component_factory=ModelToComponentFactory(
358+
disable_cache=True
359+
), # Avoid caching on the HttpClient which could result in caching the requests/responses of other tests
351360
)
352361
with HttpMocker() as http_mocker:
353362
http_mocker.get(

0 commit comments

Comments
 (0)