Skip to content

Enable UDS tests on Windows - #828

Open
drinkcat wants to merge 4 commits into
grpc:masterfrom
drinkcat:uds-windows-support
Open

Enable UDS tests on Windows#828
drinkcat wants to merge 4 commits into
grpc:masterfrom
drinkcat:uds-windows-support

Conversation

@drinkcat

@drinkcat drinkcat commented May 30, 2026

Copy link
Copy Markdown

AF_UNIX support landed in Dart SDK 3.11.0 (Flutter 3.41.0), so the
Windows skip in testUds is no longer needed.

Closes #735

  • dart-lang fix dart-lang/sdk@e50d3b9
  • I didn't bump the SDK requirement. If users want the feature on Windows, they need to upgrade. Otherwise, the current 3.8.0 should be fine. And I believe you mostly test using stable Flutter releases which should be way past 3.41.0.

@linux-foundation-easycla

linux-foundation-easycla Bot commented May 30, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: drinkcat / name: Nicolas Boichat (37d94e0)

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
grpc None 5.1.0 5.1.1 5.1.0 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

@drinkcat

drinkcat commented Jun 1, 2026

Copy link
Copy Markdown
Author

Oh, I was hoping CI would run tests on Windows, but that doesn't seem to be the case. I can try to run locally.

(I have tested this, but in a complete application)

@drinkcat

drinkcat commented Jun 1, 2026

Copy link
Copy Markdown
Author

I added a second commit, necessary to fix the tests (Windows doesn't like to remove directories when files are still in use).

Flutter 3.41.0 (Dart 3.11.0):

fvm use 3.41.0 --skip-pub-get | Out-Null; fvm dart pub get | Out-Null; fvm dart test test/round_trip_test.dart --name uds

00:00 +0: loading test/round_trip_test.dart
00:00 +0: round trip insecure connection (over uds)
00:00 +1: round trip with outgoing and incoming compression (over uds)
00:00 +2: round trip secure connection (over uds)
00:01 +3: All tests passed!

Flutter 3.38.10 (Dart 3.10.9):

fvm use 3.38.10 --skip-pub-get | Out-Null; fvm dart pub get | Out-Null; fvm dart test test/round_trip_test.dart --name uds

00:00 +0: loading test/round_trip_test.dart
00:00 +0: round trip insecure connection (over uds)
00:00 +0 -1: round trip insecure connection (over uds) [E]
  SocketException: Failed to create server socket (OS Error: Unix domain sockets are not available on this operating system.), address = C:\Users\nicolas.boichat\AppData\Local\Temp\61bf83ef/socket, port = 0
  package:grpc/src/server/server.dart 273:23  Server.serve
  ===== asynchronous gap ===========================
  test\round_trip_test.dart 123:5             main.<fn>
  ===== asynchronous gap ===========================
  test\common.dart 28:5                       testUds.<fn>

00:00 +0 -1: round trip with outgoing and incoming compression (over uds)
00:00 +0 -2: round trip with outgoing and incoming compression (over uds) [E]
  SocketException: Failed to create server socket (OS Error: Unix domain sockets are not available on this operating system.), address = C:\Users\nicolas.boichat\AppData\Local\Temp\fc3f1b07/socket, port = 0
  package:grpc/src/server/server.dart 273:23  Server.serve
  ===== asynchronous gap ===========================
  test\round_trip_test.dart 171:5             main.<fn>
  ===== asynchronous gap ===========================
  test\common.dart 28:5                       testUds.<fn>

00:00 +0 -2: round trip secure connection (over uds)
00:00 +0 -3: round trip secure connection (over uds) [E]
  SocketException: Failed to create server socket (OS Error: Unix domain sockets are not available on this operating system.), address = C:\Users\nicolas.boichat\AppData\Local\Temp\836f4a8b/socket, port = 0
  package:grpc/src/server/server.dart 260:23  Server.serve
  ===== asynchronous gap ===========================
  test\round_trip_test.dart 199:5             main.<fn>
  ===== asynchronous gap ===========================
  test\common.dart 28:5                       testUds.<fn>

00:00 +0 -3: Some tests failed.

Failing tests:
  test/round_trip_test.dart: round trip insecure connection (over uds)
  test/round_trip_test.dart: round trip secure connection (over uds)
  test/round_trip_test.dart: round trip with outgoing and incoming compression (over uds)

@mraleph

mraleph commented Jun 3, 2026

Copy link
Copy Markdown
Member

CI is red due to google/googleapis.dart#746, will have to wait for resolution of that first.

@pull-request-size pull-request-size Bot added size/S and removed size/XS labels Jun 5, 2026
@drinkcat

drinkcat commented Jun 5, 2026

Copy link
Copy Markdown
Author

(I also updated the README, thought it'd be nice to mention 3.11.0 is needed for UDS support on Windows)

@drinkcat

Copy link
Copy Markdown
Author

oh nice, I'll have a look at the CI failures

@drinkcat
drinkcat force-pushed the uds-windows-support branch from 109af82 to 198752a Compare June 10, 2026 11:26
@drinkcat

Copy link
Copy Markdown
Author

https://github.com/grpc/grpc-dart/actions/runs/27000163712/job/80522388710?pr=828

❌ test\server_handles_broken_connection_test.dart: the client interrupting the connection does not crash the server (over uds) (failed)
TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See https://pub.dev/packages/test#timeouts
dart:isolate _RawReceivePort._handleMessage

I tested locally (same dart SDK) and it seems to be a flake... 1/20 so far...

@github-actions

Copy link
Copy Markdown

Package publishing

Package Version Status Publish tag (post-merge)
package:grpc 5.1.1 ready to publish v5.1.1

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@mosuem

mosuem commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

I was hoping CI would run tests on Windows

It is running them - or what do you mean?

@drinkcat

Copy link
Copy Markdown
Author

I was hoping CI would run tests on Windows

It is running them - or what do you mean?

CI ended up running yes! I think something else was broken at the time.

drinkcat and others added 4 commits June 22, 2026 22:58
AF_UNIX support landed in Dart SDK 3.11.0, so the Windows skip is no
longer needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These two UDS tests called server.shutdown() without awaiting it, so the
testUds tearDown could start deleting the temp directory while the server
was still asynchronously unlinking the socket file inside it. On Windows
this races and throws PathNotFoundException during teardown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drinkcat
drinkcat force-pushed the uds-windows-support branch from 198752a to 1ba1b46 Compare June 22, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERROR: windows unix domain socket not support

3 participants