Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT metric unit tests part two #64

Merged
merged 44 commits into from
Nov 23, 2023
Merged

Commits on Nov 16, 2023

  1. Lay the foundation for dynamic reconfiguration of the MQTT target thr…

    …ough refactoring of the MQTT target into separate modules, replacing the use of separate Tokio tasks and multiple uses of select with a single tokio::select! macro, and splitting connection state handling into a dedicated type.
    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    5676789 View commit details
    Browse the repository at this point in the history
  2. Better fn name.

    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    a4eeaf3 View commit details
    Browse the repository at this point in the history
  3. Remove entirely the no longer used TargetActivity and related From im…

    …pl for select Either, replaced by use of tokio::select! instead.
    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    63ffd9a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d55e7b5 View commit details
    Browse the repository at this point in the history
  5. FIX: Incorrect name, type and description for metric concerning MQTT …

    …broker connection status.
    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    0138f29 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8a31cc2 View commit details
    Browse the repository at this point in the history
  7. Use additional traits and separate source Link connection from the ma…

    …in MQTT connection processing loop out of the `run()` fn into new fn `do_run()` for better testability.
    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    4b6ef2c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9013453 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    09e35ac View commit details
    Browse the repository at this point in the history
  10. Extend the config test to verify client ID requirements enforcement, …

    …and a connection refused test that tests the connection established/lost metrics showing that the new testability works.
    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    c0ce546 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4fc5090 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    389b416 View commit details
    Browse the repository at this point in the history
  13. Remove unused imports.

    ximon18 committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    c1e78a3 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Configuration menu
    Copy the full SHA
    3e89e4b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    46a0c9e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a26e087 View commit details
    Browse the repository at this point in the history
  4. Apply clippy recommendations.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    09c3f73 View commit details
    Browse the repository at this point in the history
  5. Apply clippy recommendations.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    5678d42 View commit details
    Browse the repository at this point in the history
  6. Ensure the rumqttc event loop runs in its own Tokio task as it is not…

    … cancel safe but a task JoinHandle is.
    
    As the event loop is not movable across threads/tasks it and the client must be created in the event loop task and the client passed out for use by the parent code.
    
    Additional changes:
    - Use the concept of "active" MQTT connection rather than "conncted" as reconnection is handled transparently by the rumqttc event loop and thus we do not currently know if we are actually "connected" or not.
    - Introduce "mock poll result" suport for testing with particular good/bad output froms the MQTT event `poll()`ing fn.
    - Count connection errors detected in the MQTT event loop.- Fix the `connection_refused()` test using the new "mock poll result" and connection error counting functionality.
    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    93402bb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a63dd1e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e456b49 View commit details
    Browse the repository at this point in the history
  9. Add a reconnection test.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    8bb4179 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4ad53db View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3251128 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    bf11749 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1f0efa6 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3bf6180 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    a49e674 View commit details
    Browse the repository at this point in the history
  16. cargo fmt.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    c28fc54 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4b2bd6c View commit details
    Browse the repository at this point in the history
  18. cargo fmt.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    85f95f9 View commit details
    Browse the repository at this point in the history
  19. Fix outdated comment in test.

    ximon18 committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    a604784 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Add test placeholders.

    ximon18 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    0995d86 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Fix in flight connection count trackign, extend the MQTT test suite, …

    …and to support that allow connnection events and errors to be simulated _during_ a mock connection, not only specified up front. Also required adding a notion of ClientState to track the link between the client event loop.
    ximon18 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    fa4844c View commit details
    Browse the repository at this point in the history
  2. Clippy.

    ximon18 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    236a041 View commit details
    Browse the repository at this point in the history
  3. Refactoring to make use of rumqttc automatic continuation of publicat…

    …ion after connection re-establishment.
    ximon18 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    d7067a1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    460b7c5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c1937d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ba9569a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ece8d4d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9f40ea2 View commit details
    Browse the repository at this point in the history
  9. Remove outdated comment.

    ximon18 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    a4754d2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3a35802 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2023

  1. Configuration menu
    Copy the full SHA
    38f8df9 View commit details
    Browse the repository at this point in the history