Skip to content

Release build failure with IggyMessageBus::background_tasks_len #3234

@jpds

Description

@jpds

Bug description

This accessor here:

  • /// Number of background-task handles currently retained by the bus.
    ///
    /// Test-only accessor: lets integration tests pin the
    /// reap-on-push invariant in `track_background` without exposing
    /// the underlying `RefCell<Vec<JoinHandle<()>>>` to production
    /// callers. A long-running bus is expected to keep this number
    /// bounded under sustained accept traffic; a leak shows up here as
    /// monotonic growth proportional to total accepts.
    #[cfg(any(test, debug_assertions))]
    #[must_use]
    pub fn background_tasks_len(&self) -> usize {
    self.background_tasks.borrow().len()
    }

...is called by this integration test here:

assert_eq!(
bus.background_tasks_len(),
0,
"background_tasks vec must be empty post-shutdown",
);

When I tried to build a release build of the latest iggy master and I received this compile error:

  error[E0599]: no method named `background_tasks_len` found for struct `Rc<IggyMessageBus>` in the current scope
     --> core/message_bus/tests/installer_panic_cleanup.rs:180:13

Deployment

Not applicable

Versions

master

Hardware / environment

Nix build

Sample code

No response

Logs

No response

Iggy server config

No response

Reproduction

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions