Skip to content

Commit 7d73a0c

Browse files
Removed the LastModified assertion from the test, as it can fail when the test executes too quickly and timestamps match unexpectedly.
1 parent bf73693 commit 7d73a0c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

dotnet/test/DotNetUnitTest/FileIO/FileIOTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,13 @@ public void Length_ShouldUpdate_WhenFileChanges()
167167
gxFile.Close();
168168

169169
long initialLength = gxFile.GetLength();
170-
DateTime initialLastModified = gxFile.GetLastModified();
171-
Thread.Sleep(1);
172170

173171
gxFile.Open(string.Empty);
174172
gxFile.WriteLine("Additional content");
175173
gxFile.Close();
176174

177175
long updatedLength = gxFile.GetLength();
178-
DateTime updatedLastModified= gxFile.GetLastModified();
179176
Assert.NotEqual(initialLength, updatedLength);
180-
Assert.NotEqual(initialLastModified, updatedLastModified);
181177
}
182178
}
183179
}

0 commit comments

Comments
 (0)