Skip to content

Commit

Permalink
Disable flaky part of Dir.rename directories test on Windows
Browse files Browse the repository at this point in the history
See #17134
  • Loading branch information
squeek502 authored and andrewrk committed Sep 13, 2023
1 parent cb62017 commit 89ea67a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/std/fs/test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,12 @@ test "Dir.rename directories" {
try testing.expectError(error.FileNotFound, ctx.dir.openDir(test_dir_path, .{}));
var dir = try ctx.dir.openDir(test_dir_renamed_path, .{});

// The next rename in this test can hit intermittent AccessDenied
// errors when certain conditions are true about the host system.
// For now, return early when the path type is UNC to avoid them.
// See https://github.com/ziglang/zig/issues/17134
if (ctx.path_type == .unc) return;

// Put a file in the directory
var file = try dir.createFile("test_file", .{ .read = true });
file.close();
Expand Down

0 comments on commit 89ea67a

Please sign in to comment.