]> Cypherpunks repositories - gostls13.git/commit
os: clean-up NewFile tests
authorqmuntal <quimmuntal@gmail.com>
Tue, 8 Apr 2025 10:12:37 +0000 (12:12 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 9 Apr 2025 20:06:17 +0000 (13:06 -0700)
commit7007dfcd0c32c1be83c921b0859dd48464c7c5aa
tree447543173af3f47b0a50006a4cb719028b2c0811
parent09d76e59d2e4e1c8d2c2ea99570647890057966f
os: clean-up NewFile tests

This CL removes some unnecessary code and duplicated NewFile tests
cases.

It also simplifies TestPipeCanceled by removing the need for using
SetReadDeadline. Using CancelIoEx instead of CancelIo makes the cancel
operations to finish almost instantly. The latter could take more than
20s to finish if called from a thread different from the one that
called ReadFile.

Change-Id: I9033cbcad277666bc2aec89b3e5a3ef529da2cd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/663755
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/os/os_windows_test.go