Skip to content

Conversation

@milyin
Copy link
Contributor

@milyin milyin commented Jan 15, 2026

Description

What does this PR do?

It was found that when the Transport is disconnected the LinkEvent message may be duplicated. The PR adds test for this behavior and fixes it

Why is this change needed?

Event duplication is incorrect

Related Issues

The connectivity api was added in #2301
The incorrect behavior was found in z_api_info test in eclipse-zenoh/zenoh-c#1171


🏷️ Label-Based Checklist

Based on the labels applied to this PR, please complete these additional requirements:

Labels: bug

🐛 Bug Fix Requirements

Since this PR is labeled as a bug fix, please ensure:

  • Root cause documented - Explain what caused the bug in the PR description
  • Reproduction test added - Test that fails on main branch without the fix
  • Test passes with fix - The reproduction test passes with your changes
  • Regression prevention - Test will catch if this bug reoccurs in the future
  • Fix is minimal - Changes are focused only on fixing the bug
  • Related bugs checked - Verified no similar bugs exist in related code

Why this matters: Bugs without tests often reoccur.

Instructions:

  1. Check off items as you complete them (change - [ ] to - [x])
  2. The PR checklist CI will verify these are completed

This checklist updates automatically when labels change, but preserves your checked boxes.

@milyin milyin added the bug Something isn't working label Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.96%. Comparing base (3c77c34) to head (f91c0c5).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2367      +/-   ##
==========================================
+ Coverage   71.91%   71.96%   +0.04%     
==========================================
  Files         390      390              
  Lines       62764    62769       +5     
==========================================
+ Hits        45139    45171      +32     
+ Misses      17625    17598      -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@milyin milyin changed the title Connectivity duplication event test and fix fix: Delete link events were duplicated when closing the transport Jan 15, 2026
@milyin milyin requested a review from OlivierHecart January 19, 2026 10:48
@OlivierHecart OlivierHecart enabled auto-merge (squash) January 20, 2026 15:41
@OlivierHecart OlivierHecart merged commit 96a6e43 into main Jan 20, 2026
39 checks passed
@milyin milyin deleted the connectivity_duplication_event branch January 20, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants