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

Make Network.notifier timeouts customizable (fixes #530) #536

Merged
merged 3 commits into from
Aug 14, 2024

Commits on Aug 14, 2024

  1. Add configurable timeouts for Network.notifier.

    Move the hard-coded 1 second maximum cycle duration passed during
    can.Notifier construction to a class variable NOTIFIER_CYCLE.
    Explicitly specify the timeout to stop the notifier in another class
    variable NOTIFIER_SHUTDOWN_TIMEOUT, matching the default used in
    python-can.
    
    These can be overridden per instance if needed.
    acolomb committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    559297b View commit details
    Browse the repository at this point in the history
  2. Do not wait for notifier thread shutdown during tests.

    Explicitly set the NOTIFIER_SHUTDOWN_TIMEOUT to zero in all Network
    instances created for unit tests.
    
    This reduces total test running time from ~30 to ~9 seconds when run
    locally.
    acolomb committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    94059a9 View commit details
    Browse the repository at this point in the history
  3. Update canopen/network.py

    Co-authored-by: Erlend E. Aasland <[email protected]>
    acolomb and erlend-aasland committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    64a1d6f View commit details
    Browse the repository at this point in the history