Formatting in file_operations_test.go
@@ -53,9 +53,6 @@ func TestRenameFile(t *testing.T) {
func TestFileAttributes(t *testing.T) {
preCreateTime := time.Now()
- // Sleep for 100ms else preCreateTime would be greater than modTime.
- // time.Sleep(100 * time.Millisecond)
-
fileName := createTempFile()
postCreateTime := time.Now()
@@ -64,16 +61,13 @@ func TestFileAttributes(t *testing.T) {
if err != nil {
t.Errorf("os.Stat error: %s, %v", fileName, err)
}
-
statFileName := path.Join(tmpDir, fStat.Name())
if fileName != statFileName {
t.Errorf("File name not matched in os.Stat, found: %s, expected: %s", statFileName, fileName)
}
-
if (preCreateTime.After(fStat.ModTime())) || (postCreateTime.Before(fStat.ModTime())) {
t.Errorf("File modification time not in the required time-range")
}
-
// The file size in createTempFile() is 14 bytes
if fStat.Size() != 14 {
t.Errorf("File size is not 14 bytes, found size: %d bytes", fStat.Size())
