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

Reenable ServerSocket tests #1777

Merged
merged 1 commit into from
Apr 20, 2021
Merged

Reenable ServerSocket tests #1777

merged 1 commit into from
Apr 20, 2021

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Apr 20, 2021

There are issues with IPv6 loopback addresses on build machines, so we force IPv4 and use non-blocking socket servers.

There are issues with IPv6 loopback addresses on build machines, so we
force IPv4 and use non-blocking socket servers.
@t-bast t-bast changed the title Fix tests using a ServerSocket Reenable ServerSocket tests Apr 20, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #1777 (d8b4596) into master (33d52b6) will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1777      +/-   ##
==========================================
+ Coverage   89.29%   89.33%   +0.03%     
==========================================
  Files         144      144              
  Lines       10892    10903      +11     
  Branches      459      475      +16     
==========================================
+ Hits         9726     9740      +14     
+ Misses       1166     1163       -3     
Impacted Files Coverage Δ
.../acinq/eclair/db/sqlite/SqlitePendingRelayDb.scala 93.75% <0.00%> (-2.81%) ⬇️
...cala/fr/acinq/eclair/db/sqlite/SqlitePeersDb.scala 94.44% <0.00%> (-2.53%) ⬇️
...scala/fr/acinq/eclair/db/pg/PgPendingRelayDb.scala 94.59% <0.00%> (-2.47%) ⬇️
...c/main/scala/fr/acinq/eclair/db/pg/PgPeersDb.scala 94.87% <0.00%> (-2.36%) ⬇️
...src/main/scala/fr/acinq/eclair/db/pg/PgUtils.scala 90.32% <0.00%> (-0.99%) ⬇️
...cala/fr/acinq/eclair/db/sqlite/SqliteAuditDb.scala 99.17% <0.00%> (-0.01%) ⬇️
...a/fr/acinq/eclair/db/sqlite/SqlitePaymentsDb.scala 98.36% <0.00%> (-0.01%) ⬇️
.../scala/fr/acinq/eclair/db/sqlite/SqliteUtils.scala 100.00% <0.00%> (ø)
...la/fr/acinq/eclair/db/sqlite/SqliteNetworkDb.scala 97.75% <0.00%> (ø)
...a/fr/acinq/eclair/db/sqlite/SqliteChannelsDb.scala 95.94% <0.00%> (ø)
... and 8 more

@t-bast t-bast marked this pull request as ready for review April 20, 2021 16:24
@t-bast t-bast requested a review from pm47 April 20, 2021 16:24
val mockServer = ServerSocketChannel.open()
// NB: we force 127.0.0.1 (IPv4) because there are issues on ubuntu build machines with IPv6 loopback
mockServer.bind(new InetSocketAddress("127.0.0.1", 0))
mockServer.configureBlocking(false)
Copy link
Member

Choose a reason for hiding this comment

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

configureBlocking(false) ❤️

Copy link
Member Author

Choose a reason for hiding this comment

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

I discovered that one while I was thinking that the issue was a deadlock on the server. It didn't fix the build, but it's still an improvement 😃

@t-bast t-bast merged commit 4a1dfd2 into master Apr 20, 2021
@t-bast t-bast deleted the fix-server-socket-tests branch April 20, 2021 16:30
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.

3 participants