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

Fix missing Cancel() in tests that don't consume the entire source #32

Merged
merged 2 commits into from
Mar 27, 2017

Conversation

akarnokd
Copy link
Contributor

Some of the TCK tests didn't cancel their ISubscriptions when they stopped consuming the source which could lead to resource leaks.

This is also an issue in the JVM version of the tck: reactive-streams/reactive-streams-jvm#346

@Aaronontheweb
Copy link

cc @Silv3rcircl3

@marcpiechura
Copy link
Contributor

@akarnokd could you please add yourself to the copyright file? Thx. Will merge once it's merged on the jvm too.

@akarnokd
Copy link
Contributor Author

Done in #33.

@marcpiechura marcpiechura mentioned this pull request Mar 21, 2017
@viktorklang
Copy link
Contributor

Ping @ktoso, thoughts? :)

@@ -0,0 +1,192 @@
using NUnit.Framework;
Copy link

Choose a reason for hiding this comment

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

should rs.net also have copy header as we did in the jvm sources?
(general remark, all sources should get it)

@ktoso
Copy link

ktoso commented Mar 24, 2017

Will have a look - was in my todo list, fell asleep in the evening though, kind of tired ;)

Copy link

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

LGTM, looks correct. Thanks for mirroring the change to .net

{
b.Append("\r\n-------------------------------");

b.Append("\r\nat ").Append(stacks[t.Key]);
Copy link

Choose a reason for hiding this comment

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

hm, so Append(stacks: collection), but that won't insert the \r\nat before each of the entries right? So has to be done via normal loop I guess, unless this API has something magical to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No and doesn't matter. Unlike Java, the console output is not pretty printed and stacktraces are not appear as links in C#.

Copy link

Choose a reason for hiding this comment

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

If no one is looking at it why print it at all...? Without even a space or newlines between elements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It printed the methods that needed attention when I was fixing the underlying problem. Plus it will print problems in case new TCK tests are added in the future.

@marcpiechura marcpiechura merged commit 34a898c into reactive-streams:master Mar 27, 2017
@akarnokd akarnokd deleted the TCKCancel branch March 27, 2017 17:11
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.

6 participants