Kaivalya Apte created FLINK-40036:
-------------------------------------

             Summary: 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


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)

Reply via email to