leizhiyuan commented on PR #1409:
URL: 
https://github.com/apache/rocketmq-clients/pull/1409#issuecomment-6377174343

   Rebased onto `master` (`e0cd6e05`, after #1404 / #1381). `e379e71e` → 
`879278a5`. As noted in #1412, #1381 already added a "wait for the initial 
`Settings`" signal, so this PR now reuses it instead of adding a second one:
   
   - **`lite_subscription_manager.rs`**:
     - Uses #1381's `settings_ready_tx` / `wait_for_initial_settings`; this 
PR's own `settings_initialized` copy is dropped.
     - Still removes the `quota == 0` special case in 
`check_lite_subscription_quota` (Java has none). Kept tests: 
`test_check_quota`, `test_wait_for_initial_settings_wakes_up_waiter`, 
`test_scheduler_clone_shares_initial_settings_state`. 
`test_wait_for_initial_settings` is renamed to 
`test_sync_settings_applies_quota_and_max_size`, because #1381's test already 
covers the timeout part.
     - #1381's `test_stop_scheduler_cancels_periodic_sync` now sets a quota 
first: without the `quota == 0` exception, the periodic sync is rejected 
locally until the server settings arrive, as in Java 
`checkLiteSubscriptionQuota`.
   - **`push_consumer.rs`**: The telemetry loop keeps #1404's `apply_settings` 
and then forwards the command (the one-hunk conflict described in #1412). The 
forwarding test also mocks `long_polling_timeout_handle`, which #1404 added.
   - **`lib.rs`**: Takes `master`'s version. #1381 already compiles 
`lite_subscription_manager` in unit tests.
   - **`lite_push_consumer.rs`**: Merged cleanly and is unchanged. `start()` 
waits for the first `Settings` and fails after `3s + request timeout` (Java 
`ClientImpl#startUp`). `LiteSimpleConsumer` (#1381) still logs a warning and 
continues after its timeout; aligning it is left for a follow-up.
   
   `cargo test -- --test-threads=1`: 136 passed (lib), stable over repeated 
runs; integration and doc tests pass; `fmt --check`, `doc` and `build 
--examples --all-features` are clean; `clippy -D warnings` is clean. `clippy 
--all-targets` shows 1 extra `await_holding_lock` warning, from the `MTX` guard 
in `test_start_with_telemetry_forwards_commands` (the existing test pattern).
   


-- 
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]

Reply via email to