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

Added tests for the comm classes #129

Merged
merged 2 commits into from Jan 5, 2023

Conversation

urmahp
Copy link
Collaborator

@urmahp urmahp commented Nov 7, 2022

This add tests for

  • bin parser
  • package serializer
  • TCP socket
  • stream
  • producer
  • pipeline

Fixed check size in bin parser, so that it works with starndard data types

Added recconection time variable to TCP socket, this will control the time in between connection attempts if the server is unavailable.

@urmahp
Copy link
Collaborator Author

urmahp commented Nov 7, 2022

I will have to dig into why the consumer test is failing, as it hasn't been failing locally, so I am converting this PR to a draft for now.

@urmahp urmahp marked this pull request as draft November 7, 2022 14:46
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Base: 74.59% // Head: 77.45% // Increases project coverage by +2.86% 🎉

Coverage data is based on head (58b1d84) compared to base (1853580).
Patch coverage: 96.37% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage   74.59%   77.45%   +2.86%     
==========================================
  Files          89       95       +6     
  Lines        3491     3939     +448     
  Branches      368      385      +17     
==========================================
+ Hits         2604     3051     +447     
+ Misses        668      664       -4     
- Partials      219      224       +5     
Impacted Files Coverage Δ
tests/test_producer.cpp 91.42% <91.42%> (ø)
tests/test_pipeline.cpp 91.56% <91.56%> (ø)
tests/test_tcp_socket.cpp 96.21% <96.21%> (ø)
tests/test_stream.cpp 97.29% <97.29%> (ø)
include/ur_client_library/comm/bin_parser.h 89.23% <100.00%> (+12.86%) ⬆️
include/ur_client_library/comm/tcp_socket.h 66.66% <100.00%> (+16.66%) ⬆️
src/comm/tcp_socket.cpp 85.36% <100.00%> (+14.11%) ⬆️
tests/test_bin_parser.cpp 100.00% <100.00%> (ø)
tests/test_package_serializer.cpp 100.00% <100.00%> (ø)
...lient_library/rtde/control_package_setup_outputs.h 50.00% <0.00%> (-25.00%) ⬇️
... and 13 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@urmahp
Copy link
Collaborator Author

urmahp commented Nov 18, 2022

I found the issue. Since the consumer is running in a thread sometimes the consumer wasn't started when the message was send to the client and therefore the test failed, this has been fixed with a retry mechanism, so the message is resend to the client if the first one wasn't consumed.

@urmahp urmahp marked this pull request as ready for review November 18, 2022 11:48
urmahp and others added 2 commits January 5, 2023 09:33
This add tests for
* bin parser
* package serializer
* TCP socket
* stream
* producer
* pipeline

Fixed check size in bin parser, so that it works with starndard data types

Added recconection time variable to TCP socket, this will control the time in between connection attempts if the server is unavailable.
Copy link
Collaborator

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After fixing the segfault in the pipeline test this seems fine. Thank you @urmahp

@fmauch fmauch merged commit 2e69bc1 into UniversalRobots:master Jan 5, 2023
@urmahp urmahp deleted the comm_interface_tests branch January 6, 2023 07:06
urrsk pushed a commit to urrsk/Universal_Robots_Client_Library that referenced this pull request Jun 28, 2023
* Added tests for the comm classes

This add tests for
* bin parser
* package serializer
* TCP socket
* stream
* producer
* pipeline

Fixed check size in bin parser, so that it works with starndard data types

Added recconection time variable to TCP socket, this will control the time in between connection attempts if the server is unavailable.

Co-authored-by: Felix Exner <exner@fzi.de>
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.

None yet

2 participants