Skip to content

Conversation

xlcheng1
Copy link
Contributor

@xlcheng1 xlcheng1 commented Aug 9, 2022

Motivation

Modifications

Change summary

Using conditional_variable to hold the main thread until the supporting thread is finished

Revision diff summary

If there is more than one revision, please explain what has been changed since the last revision.

Testing

Is your change tested? If not, please justify the reason.
Please list your testing steps and test results.

  • CI test run result:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -371,27 +371,6 @@ TEST_CASE( "Test destination mode", "[destination]") {
{
return (msg.type() == com::amazonaws::iot::securedtunneling::Message_Type_STREAM_RESET) && msg.streamid() == 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible that the reason of this test failure is that we have reset the stream? maybe process did not have enough time between resetting stream and creating new connection.

@@ -371,27 +371,6 @@ TEST_CASE( "Test destination mode", "[destination]") {
{
return (msg.type() == com::amazonaws::iot::securedtunneling::Message_Type_STREAM_RESET) && msg.streamid() == 1;
});
destination_socket.close();
Copy link
Contributor

Choose a reason for hiding this comment

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

should we wait until we get acknowledgement from the destination LP that the stream is reset now before closing the connection?

on which line did we see the failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried put tcp_accept_thread.join(); before REQUIRE( accepted ); and it stucks there, seems that tcp_accept_thread.join(); never finished and join back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and that is not consistent, sometimes it passes sometimes it sits there got stuck

@xlcheng1 xlcheng1 merged commit b7ae265 into master Aug 12, 2022
@HarshGandhi-AWS HarshGandhi-AWS deleted the FixTest branch April 20, 2023 22:24
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.

3 participants