Comments (2)
I've been trying to fix some other test flakiness (which might address that ENOENT
error) and have been running hundreds of test iterations, and I've also been hitting failures related to access timestamps:
00:03 +13 ~2: loading test/local_test.dart
Expected: a DateTime <= 2020-06-19 11:09:37.999
Actual: DateTime:<2020-06-19 11:09:38.000>
Which: is after 2020-06-19 11:09:37.999 by 0:00:00.001000
package:test_api expect
test/common_tests.dart 1597:11 runCommonTests.<fn>.<fn>.<fn>.<fn>
00:03 +13 ~2: loading test/local_test.dart
Expected: a DateTime <= 2020-06-19 11:44:49.997
Actual: DateTime:<2020-06-19 11:44:50.000>
Which: is after 2020-06-19 11:44:49.997 by 0:00:00.003000
package:test_api expect
test/common_tests.dart 1661:11 runCommonTests.<fn>.<fn>.<fn>.<fn>
00:05 +549 ~4 -1: ChrootFileSystem localBacked common File lastModified isNowForNewlyCreatedFile [E]
Expected: a DateTime <= 2020-06-19 11:58:33.000
Actual: DateTime:<2020-06-19 11:58:34.000>
Which: is after 2020-06-19 11:58:33.000 by 0:00:01.000000
package:test_api expect
test/common_tests.dart 1638:11 runCommonTests.<fn>.<fn>.<fn>.<fn>
In all of the cases, the "Actual" value seems to be at an exact second, which probably isn't coincidental.
I don't see anything obviously wrong with the test code and so far haven't been able to successfully simulate the failure. (As an aside, ceil([DateTime])
is misleading since it's not a mathematical ceiling, but I think it does behave as intended. I think it'd be clearer to replace ceil()
with floor() + oneSecond
though.)
from file.dart.
I believe the ENOENT
errors should be fixed by #150.
In all of the cases, the "Actual" value seems to be at an exact second, which probably isn't coincidental.
This is a red herring. I misread the test. Those "Actual" times are the ones rounded down by floor()
, so it's expected that they are at an exact second. The "Expected" time is the file's access time. (That's confusing; we should change those expect()
calls since it's the access time that is being tested.)
Anyway, I made a reproduction case by distilling one of the modification time tests down and running it in a continuous loop for 1 second. (The modification time tests can hit a similar failure as the access time ones, and with modification times I don't need to worry about potential weirdness from noatime
or relatime
settings.) The failure also happens when using dart:io
's File
directly, and so far I've been unable to reproduce it with an analogous C program, so I think that the timestamp discrepancy is from some weirdness in the SDK or in the VM. I'll file an SDK bug.
from file.dart.
Related Issues (20)
- MemoryDirectory does not list files properly on Windows HOT 5
- The system was unable to move the file to a different disk drive
- MemoryFileSystem is 10x slower to write than LocalFileSystem HOT 6
- What is the best way to check in a unit-test if all randomaccessfile objects are closed properly?
- Best way to close the LocalFileSystem HOT 1
- File created via MemoryFileSystem is implemented differently from dart:io File HOT 2
- Please add tags for released versions
- FileSystem.directory(...).list(...) and listSync(...) fail on self-linked directories HOT 3
- CI failing on windows (due to a failing test - succeedsIfDestinationIsEmptyDirectory) HOT 1
- MemoryFileSystem.isDirectory(r'\') crashes HOT 2
- move this package into the google.dev publisher? HOT 5
- Seeing issues when an older package:file is run on a newer SDK HOT 12
- Migrate mixins to be mixin declarations HOT 8
- Runtime exception on web when trying to DirectoryNode.clock HOT 3
- MemoryFileSystem addStream misbehaves on error HOT 1
- Local and memory implementation throw different exceptions
- Any breaking changes introduced in 7.0.0?
- Filenames encoded on Gnome's Google Drive
- implement for FileSystemOp.listSync
- android.system.ErrnoException: open failed: ENOENT (No such file or directory)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from file.dart.