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

Add duplex test #19

Merged
merged 5 commits into from
Jun 26, 2022
Merged

Add duplex test #19

merged 5 commits into from
Jun 26, 2022

Conversation

sake92
Copy link
Contributor

@sake92 sake92 commented Aug 28, 2021

While working on Windows fixes for Mill, I thought that duplex mode was not working properly.
Mill writes/reads to socket simultaneously from different threads.
But seems like I was wrong.
Anyway, this test should be useful to cover it..

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Just noticed this. Thanks!

@eed3si9n eed3si9n merged commit 7b97350 into sbt:master Jun 26, 2022
@eed3si9n
Copy link
Member

Hmm. I am not sure if it's working actually. CI failed immediately upon merge:

https://github.com/sbt/ipcsocket/runs/7058379356?check_suite_focus=true

[client] got a message: hello12
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at org.scalasbt.ipcsocket.duplex.Receiver.run(Receiver.java:28)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[server] sending msg: 13
[server] sending msg: 14
[error] Test org.scalasbt.ipcsocket.duplex.DuplexTest.testDuplexCommunication failed: expected:<15> but was:<13>, took 18.014 sec

@eed3si9n eed3si9n mentioned this pull request Jun 26, 2022
@eed3si9n
Copy link
Member

More sleeping seems to have fixed it #25

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.

2 participants