The GitHub Actions job "Release Auditing" on 
texera.git/gh-readonly-queue/main/pr-6491-bc8f8a4193a7b70043cee907f1ef5b31ae8f1b47
 has succeeded.
Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).

Head commit for run:
cd1c1a3e012795a54038e057d3ba48ef02721b42 / Eugene Gu <[email protected]>
test(pyamber): add unit test coverage for InputManager (#6491)

### What changes were proposed in this PR?

Adds `test_input_manager.py` (new, 20 tests) for the Python worker's
`InputManager`
(`amber/src/main/python/core/architecture/packaging/input_manager.py`),
which had no direct unit tests — the Scala `InputManager` is covered by
#5451, but the Python counterpart was only exercised indirectly through
`MainLoop`. Uses a real `InternalQueue`, in-memory `Schema`/`pyarrow`
tables, and stubbed reader runnables, so no engine or storage is needed.

The suite covers:
- **Registration** — `add_input_port` / `register_input`: `None`
`id`/`internal` fields are normalized to `0`/`False`, re-adding an
existing port is ignored, and channel-to-port bindings are checked in
both directions.
- **Completion tracking** — completing a channel marks its port;
`all_ports_completed` is vacuously `True` with zero ports; completing
one channel completes the whole port even if its other channels are
still open (safe today because the `EndChannel` ECM is port-aligned —
documented in a test comment).
- **Channel filtering** — `get_all_data_channel_ids` excludes control
channels.
- **Materialization readers** — mismatched `uris`/`partitionings` raise;
one reader is created per URI with the right pairing; a second setup
replaces the readers instead of appending; finished readers are not
restarted, and unfinished ones run on daemon threads.
- **`process_data_payload`** — a DataFrame becomes `Tuple`s carrying the
port's schema; an empty table yields nothing; a StateFrame passes
through unchanged; a DataFrame from an unregistered channel fails only
when the generator is consumed; unknown payload types raise
`NotImplementedError`.

### Any related issues, documentation, discussions?

Closes #6486

### How was this PR tested?

```
cd amber/src/main/python
PYTHONPATH=. python -m pytest ../../test/python/core/architecture/packaging/ -v
# 28 passed (20 new InputManager tests + 8 existing OutputManager tests)
```

### Was this PR authored or co-authored using generative AI tooling?

Co-authored by: Claude Code (Fable 5)

Report URL: https://github.com/apache/texera/actions/runs/30397312534

With regards,
GitHub Actions via GitBox

Reply via email to