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

[20692] Make sample_lost_be_dw_be_dr_fragments test less flakey #4620

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Mar 26, 2024

Description

Blackbox test sample_lost_be_dw_be_dr_fragments has been failing from time to time.
It fails because more samples than expected are lost.
The socket buffer size was only configured for the reader so fragments could have been lost in the writer.
This PR configures the socket buffer size in both the reader and the writer.

Contributor Checklist

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany MiguelCompany added this to the v2.14.1 milestone Mar 26, 2024
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@EduPonz EduPonz added the ci-pending PR which CI is running label Mar 26, 2024
@EduPonz
Copy link

EduPonz commented Mar 26, 2024

I did a manual Github CI run just for the modified test:

@EduPonz EduPonz merged commit f242f86 into master Mar 27, 2024
7 checks passed
@EduPonz EduPonz deleted the hotfix/sample_lost_be_dw_be_dr_fragments branch March 27, 2024 07:28
MiguelCompany added a commit that referenced this pull request Mar 27, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Mar 27, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Mar 27, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@EduPonz EduPonz removed the ci-pending PR which CI is running label Apr 3, 2024
MiguelCompany added a commit that referenced this pull request May 7, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 7, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 16, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 17, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 17, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 17, 2024
…samples (#4187) (#4606)

* Fix on_sample_lost notification on best-effort readers for fragmented samples (#4187)

* Refs #20162. Regression test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Notify sample lost when dropping fragmented change.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20167. Linters.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Apply suggestions.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Use constexpr for buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Lower buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20351. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 5ac198e)

* Make sample_lost_be_dw_be_dr_fragments test less flaky (#4620)

* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Test improvements

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 24, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
JesusPoderoso pushed a commit that referenced this pull request May 24, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request May 28, 2024
… samples (#4187) (#4608)

* Handle errors when setting socket buffer sizes (#4760) (#4796)

* Refs #20972. Method socket_buffer_size in DDS_PIM helpers sets also sending buffer.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Method socket_buffer_size in fastrtps_deprecated helpers sets also sending buffer.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Improvements in on_sample_lost blackbox tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Move code into new private methods.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_send_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_receive_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check user configuration at the beginning of init method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Use maxMessageSize as minimum possible value.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Applying changes on CreateInputChannelResource.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Revert "Refs #20972. Applying changes on CreateInputChannelResource."

This reverts commit ed848e9.

* Refs #20972. Add helper header with template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods return boolean.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods use new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. OpenAndBindUnicastOutputSocket uses new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Changes in OpenAndBindInputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972.Setting options on TCP channels.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Doxygen.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check limits of configured sizes.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add UDP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add TCP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Move checks in TCP to beginning of init.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in UDP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in TCP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove unused constants in UDP tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check final configuration on unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Less strict tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove `s_minimumSocketBuffer` from tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Deprecate `s_minimumSocketBuffer`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 53cd211)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPv4Transport.cpp
#	src/cpp/rtps/transport/UDPv6Transport.cpp
#	test/blackbox/common/DDSBlackboxTestsListeners.cpp

* Refs #21036. Fix conflicts.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #21036. Update for non-backported changes

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Fix on_sample_lost notification on best-effort readers for fragmented samples (#4187)

* Refs #20162. Regression test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Notify sample lost when dropping fragmented change.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20167. Linters.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Apply suggestions.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Use constexpr for buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Lower buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20351. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 5ac198e)

* Make sample_lost_be_dw_be_dr_fragments test less flaky (#4620)

* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Improvements in on_sample_lost blackbox tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany added a commit that referenced this pull request Jun 26, 2024
* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
EduPonz pushed a commit that referenced this pull request Jun 28, 2024
… samples (#4187) (#4607)

* Handle errors when setting socket buffer sizes (#4760) (#4795)

* Refs #20972. Move code into new private methods.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_send_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_receive_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check user configuration at the beginning of init method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Use maxMessageSize as minimum possible value.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add helper header with template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods return boolean.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods use new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. OpenAndBindUnicastOutputSocket uses new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Changes in OpenAndBindInputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972.Setting options on TCP channels.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Doxygen.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check limits of configured sizes.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add UDP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add TCP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Move checks in TCP to beginning of init.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in UDP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in TCP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove unused constants in UDP tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check final configuration on unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Less strict tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove `s_minimumSocketBuffer` from tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Deprecate `s_minimumSocketBuffer`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 532acfa)

* Fix conflicts

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Fix on_sample_lost notification on best-effort readers for fragmented samples (#4187)

* Refs #20162. Regression test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Notify sample lost when dropping fragmented change.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20167. Linters.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Apply suggestions.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Use constexpr for buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20162. Lower buffer size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20351. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 5ac198e)

* Make sample_lost_be_dw_be_dr_fragments test less flaky (#4620)

* Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20692. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Improve test.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants