geeknarrator opened a new pull request, #28589:
URL: https://github.com/apache/flink/pull/28589
## What is the purpose of the change
Some state-backend implementations need 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 builds for itself. Today there is no way to inject such an
environment
into the multi-input test harnesses, and `MockEnvironmentBuilder` cannot set
a job
configuration.
This change adds that capability as a generic test utility so harness-based
tests
can construct the operator with a custom `MockEnvironment`.
## Brief change log
- `MockEnvironmentBuilder`: add `setJobConfiguration(...)` and pass the job
configuration through to `MockEnvironment` (previously hardcoded to an
empty
`Configuration`).
- `MultiInputStreamOperatorTestHarness` /
`KeyedMultiInputStreamOperatorTestHarness`:
add constructors that accept a `MockEnvironment`.
- `StateParameterizedHarnessTestBase`: add a `createMockEnvironment()`
helper that
builds an environment with sufficient managed memory and a filesystem
checkpoint
storage, reusable across backends.
- `StreamingMultiJoinOperatorTestBase`: build the harness with the custom
environment and close the environment in `afterEach`.
## Verifying this change
This change is a test-only utility change and is covered by the existing
`StateParameterizedHarnessTestBase`-based tests (e.g. the streaming
multi-join
operator tests), which continue to pass with the HEAP and ROCKSDB backends.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (Claude Code)
Claude Code (Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]