[
https://issues.apache.org/jira/browse/FLINK-40036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18093229#comment-18093229
]
Kaivalya Apte commented on FLINK-40036:
---------------------------------------
Thanks [~beetleyibo] for the vote and showing interest. I actually have a PR
for this https://github.com/apache/flink/pull/28589
> Support injecting a custom MockEnvironment into multi-input operator test
> harnesses
> -----------------------------------------------------------------------------------
>
> Key: FLINK-40036
> URL: https://issues.apache.org/jira/browse/FLINK-40036
> Project: Flink
> Issue Type: Improvement
> Components: Tests
> Reporter: Kaivalya Apte
> Priority: Minor
>
> Some state-backend implementations require the test harness to run with a
> properly configured MockEnvironment (e.g. more managed memory than the 3 MB
> default, a job configuration, and checkpoint storage access) rather than the
> bare environment the harness constructs for itself.
> Currently:
> - MultiInputStreamOperatorTestHarness and
> KeyedMultiInputStreamOperatorTestHarness
> offer no constructor that accepts a caller-provided MockEnvironment.
> - MockEnvironmentBuilder cannot set a job configuration; MockEnvironment
> hardcodes
> it to an empty Configuration.
> This makes it hard for parameterized harness tests (e.g. those based on
> StateParameterizedHarnessTestBase) to run against backends that need a richer
> environment.
> Proposed change (test-only):
> - Add MockEnvironmentBuilder#setJobConfiguration(...) and pass the job
> configuration through to MockEnvironment.
> - Add MockEnvironment-accepting constructors to the two multi-input test
> harnesses.
> - Add a reusable createMockEnvironment() helper in
> StateParameterizedHarnessTestBase
> and use it (plus environment cleanup) in StreamingMultiJoinOperatorTestBase.
> No production code paths are affected; changes are limited to test utilities.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)