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

core: Added changes to DelayedStream.setStream() should cancel the provided stream if not using it #11969

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Sangamesh1997
Copy link

core: Added changes to DelayedStream.setStream() should cancel the provided stream if not using it

Fixes: #1537

@@ -271,14 +272,41 @@ public void uncaughtException(Thread t, Throwable e) {
verifyNoMoreInteractions(mockRealStream);
}

@Test
public void newStreamThenShutDownNow() {
Copy link
Contributor

Choose a reason for hiding this comment

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

append test with UT method name -> testNewStreamThenShutDownNow()

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

ClientStream stream = delayedTransport.newStream(
method, new Metadata(), CallOptions.DEFAULT, tracers);
stream.start(streamListener);
assertEquals(1,delayedTransport.getPendingStreamsCount());
Copy link
Contributor

@vinodhabib vinodhabib Mar 19, 2025

Choose a reason for hiding this comment

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

add an empty line above asserts statements in all applicable places.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Contributor

@vinodhabib vinodhabib left a comment

Choose a reason for hiding this comment

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

Added some minor comments, please check.

return null;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

remove an empty line here

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

@Sangamesh1997 Sangamesh1997 marked this pull request as ready for review March 21, 2025 07:02
Copy link
Contributor

@vinodhabib vinodhabib left a comment

Choose a reason for hiding this comment

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

Changes LGTM

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.

DelayedStream.setStream() should cancel the provided stream if not using it
2 participants