-
Notifications
You must be signed in to change notification settings - Fork 140
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
!test Migrate multi node testkit to Netty 4. #539
Conversation
I agree that this can be merged to pekko main (when it is approved) and eventually released with pekko 1.1.0. I think that anyone who needs this code before the pekko 1.1.0 can easily create their own jar. It would probably be useful for a pekko-multi-node-netty4-testkit project to be created in GitHub for that project to release jars. The project can be archived after the pekko 1.1.0 release. |
@pjfanning |
When I say ping, I don't mean the Unix command. Wiktionary has this meaning (among many) of the word 'ping'. A packet which a remote host is expected to echo, thus indicating its presence. |
I will udpate the pr wit a java |
8e3d77b
to
3d9c26f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, PR generally looks fine. My main remarks are regarding magic constants and some changes I think be split out and merged on their own so they can be backported.
multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/RemoteConnection.scala
Outdated
Show resolved
Hide resolved
override def shutdown(): Unit = { | ||
try { | ||
channelFuture.channel().close().sync() | ||
parentEventLoopGroup.shutdownGracefully(1L, 1L, TimeUnit.SECONDS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment about configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @mdedetrich - this would be better as a setting in reference.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just updated the code without this, but which may waiting max to 15 seconds. the old code is deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdedetrich I updated it to .shutdownGracefully(0L, 0L, TimeUnit.SECONDS)
which alian the old behavior.
I have just run the cluster tests on the latest version of this PR on my linux x86_64 box and I can confirm that they all pass, good work! After the comments are addressed the PR looks to be in good shape to me. I have attached the test log for those curios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I am approving changes, previous comments are resolved. I am not fully aware of this part of the code so it would be good to get some more eyes before merging (we aren't in a massive rush to merge this right now).
val testClass2Process = (testClass, Jvm.startJvm(javaBin, allJvmOptions, runOptions, jvmLogger, connectInput)) | ||
if (index == 0) { | ||
log.debug("%s for %s 's started as `Controller`, waiting before can be connected for clients.".format(jvmName, | ||
testClass)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdedetrich This is the real fix which can be a sleep(2000) or like thing. the error was a CONNECT(2)
from the networking , which I was thing caused by resolver or my code bug.
b772a9b
to
5a4b65f
Compare
Signed-off-by: He-Pin <hepin1989@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I ran several times on gitpod. it works, I will do a final validation before merge this. |
I ran it several times again and it do passed, so it should be good to go. |
refs: #462
I verified it locally with
sbt cluster/MultiJvm/test
previous: #486