Skip to content

Conversation

@whyoleg
Copy link
Member

@whyoleg whyoleg commented Oct 15, 2020

  • fixes Payload leaking tests + fixes (take from RSocket-java) #82
  • Add tracking of borrowed/recycled packets allocation
  • mark most of IO/Frame API as internal for now
  • fix payload releasing on errors/cancelation and so on
  • reworked tests, which uses TestConnection to use turbine instead of handmade checks

use leak detection in all core tests + transport test for local connection
fix some releasing issues, still WIP
remove suppress for some functions
@whyoleg whyoleg added this to the 0.10.0 milestone Oct 15, 2020
@whyoleg whyoleg self-assigned this Oct 15, 2020
}
}

interface TestWithLeakCheck {
Copy link
Member

Choose a reason for hiding this comment

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

I came here to suggest this. This is great!

@yschimke
Copy link
Member

One bit of critical feedback. I feel like this should be multiple PRs. I'm not suggesting this to ask you to change it (don't! just land it), but that given the N:1 reviewer ratio, if you made the internal changes in a single PR. Added pooling. Added the leak checking.

}

suspend fun FlowTurbine<*>.expectNoEventsIn(timeMillis: Long) {
delay(timeMillis)
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a concept of mocked time in ktor, rsocket-kotlin or otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

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

there is mocked time in kotlinx-coroutines-debug with test dispatcher. But I'm not sure, that it will work as expected, as in most places, delay is used to handle asynchronous cancellation of jobs, channels. But that can be of course investigated

Copy link
Member

Choose a reason for hiding this comment

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

It will affect you more than me. But yeah, often the time based tests are the least deterministic, and overtime cause the most wasted developer & CI wallclock time. Getting something good in place can literally mean the difference between 1-2 second tests and 1-2 minutes.

Copy link
Member

@yschimke yschimke left a comment

Choose a reason for hiding this comment

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

Nice!

It's a tough review given the size, formatting changes, internal/testing changes and the meat of the change.

I'd love to test this with the other PR at the same time from snapshots.

README.md Outdated
The `master` branch is now dedicated to development of multiplatform rsocket-kotlin.
For now only snapshots are available via [oss.jfrog.org](oss.jfrog.org) (OJO).
The `master` branch is now dedicated to development of multiplatform rsocket-kotlin. For now only snapshots are available
via [oss.jfrog.org](oss.jfrog.org) (OJO).
Copy link
Member

Choose a reason for hiding this comment

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

This link is a dead link

Copy link
Member

Choose a reason for hiding this comment

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

Maybe link to https://oss.jfrog.org/artifactory/oss-snapshot-local/io/rsocket/kotlin/ with an example for using a snapshot.

Copy link
Member Author

Choose a reason for hiding this comment

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

will do

@whyoleg
Copy link
Member Author

whyoleg commented Oct 15, 2020

@yschimke yes, I understand, that it would be better to split in in 2: leak detection and internal marking. Firstly thought about it, but as it's almost last PR before release, I don't want to fight with multiple branches.
Future PRs will be more like one change per PR

@whyoleg whyoleg merged commit 5c58df9 into master Oct 18, 2020
@whyoleg whyoleg deleted the task/leak-detection branch October 18, 2020 17:32
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.

Payload leaking tests + fixes (take from RSocket-java)

3 participants