Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f515710
Relax LinkTarget so it always returns null when steps on an error
jozkee Jul 14, 2021
08233ba
Make polling use the symbolic link target's LastWriteTime
jozkee Jul 14, 2021
d780995
Fix for the case where the link can change its target
jozkee Jul 15, 2021
ac4a845
Add more test cases and exclude them from non-netcoreapp tfms
jozkee Jul 15, 2021
b4895ad
Fix project references in ref projects
jozkee Jul 15, 2021
ebb0326
Do not use UnsupportedOSPlatforms on test project in order to fix CI …
jozkee Jul 16, 2021
1164e33
Do not return link's LastWriteTime when target not exists
jozkee Jul 19, 2021
98b737a
Address feedback on tests and improve them to cover more scenarios.
jozkee Jul 19, 2021
75fcf96
Make the project unsupported in browser.
jozkee Jul 19, 2021
144335a
Fix duplicate reference to PlatformAttributes with IncludePlatformAtt…
jozkee Jul 19, 2021
9c50a3a
Disable default items for browser
jozkee Jul 20, 2021
b2f9bad
Undo unrelated changes to Strings.resx
jozkee Jul 20, 2021
d8d143a
Replace Thread.Sleep with Task.Delay, add assertion messages to try t…
jozkee Jul 20, 2021
c7e28d4
Replace HasChanged for RegisterChangeCallback in tests
jozkee Jul 21, 2021
5b85631
Add messages to asserts to attempt to debug CI issues
jozkee Jul 21, 2021
5c27cae
Add date format to assertion messages.
jozkee Jul 21, 2021
19dd9c3
Increase delay between writes to one second since OSX doesn't report …
jozkee Jul 21, 2021
8c1b3a2
Merge branch 'main' of https://github.com/dotnet/runtime into symlink…
jozkee Jul 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add date format to assertion messages.
  • Loading branch information
jozkee committed Jul 21, 2021
commit 5c27caea5fef4e9c7ecd167192c9632ba0910e88
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged(bool useWild

// Assert
Assert.True(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
$"Change event was not raised - current time: {DateTime.UtcNow}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath)}");
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath):O}");
}

[Theory]
Expand All @@ -1561,7 +1561,7 @@ public void UsePollingFileWatcher_UseActivePolling_HasChanged_FileDeleted(bool u

// Assert
Assert.True(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
$"Change event was not raised - current time: {DateTime.UtcNow}, file Exists: {File.Exists(filePath)}");
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file Exists: {File.Exists(filePath)}.");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink

// Assert
Assert.True(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
$"Change event was not raised - current time: {DateTime.UtcNow}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath)}");
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath):O}.");
}

[Theory]
Expand All @@ -60,7 +60,8 @@ public void UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink_Targe
token.RegisterChangeCallback(_ => { tcs.TrySetResult(); }, null);

// Assert
Assert.False(tcs.Task.Wait(TimeSpan.FromSeconds(30)));
Assert.False(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
"Change event was raised when it was not expected.");
}

[Theory]
Expand Down Expand Up @@ -101,7 +102,7 @@ public async Task UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink

// Assert - It should report the change regardless of the timestamp being older.
Assert.True(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
$"Change event was not raised - current time: {DateTime.UtcNow}, file1 LastWriteTimeUtc: {File.GetLastWriteTimeUtc(file1Path)}, file2 LastWriteTime: {File.GetLastWriteTimeUtc(file2Path)}");
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file1 LastWriteTimeUtc: {File.GetLastWriteTimeUtc(file1Path):O}, file2 LastWriteTime: {File.GetLastWriteTimeUtc(file2Path):O}.");
}

[Theory]
Expand Down Expand Up @@ -132,7 +133,7 @@ public void UsePollingFileWatcher_UseActivePolling_HasChanged_SymbolicLink_Targe

// Assert
Assert.True(tcs.Task.Wait(TimeSpan.FromSeconds(30)),
$"Change event was not raised - current time: {DateTime.UtcNow}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath)}");
$"Change event was not raised - current time: {DateTime.UtcNow:O}, file LastWriteTimeUtc: {File.GetLastWriteTimeUtc(filePath):O}.");
}
}
}