-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some async tests are missing asyncStart
/asyncEnd
#2398
Comments
@osa1 thank you! I added some missed main() async {
await test1();
...
await test2();
} don't need asyncStart/End(). But I found a lot of tests that have excessive |
…ncMultiTest (#2406) Update asyncStart/End() to correspond SDK version. Replace asyncMultiStart by asyncStart.
… web. Language and LanguageFeatures tests
…guage and LanguageFeatures tests (#2407) Update async tests to avoid false-positive results on web, Language and LanguageFeatures tests
2023-12-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/setup-java from 3.13.0 to 4.0.0 (dart-lang/co19#2410) 2023-12-01 sgrekhov22@gmail.com dart-lang/co19#2398. Update async tests to avoid false-positive results on web. Language and LanguageFeatures tests (dart-lang/co19#2407) 2023-12-01 sgrekhov22@gmail.com Fixes dart-lang/co19#2408. Fix roll failures (dart-lang/co19#2409) 2023-11-30 sgrekhov22@gmail.com dart-lang/co19#2398. Update asyncStart/End() to correspond SDK version. Replace asyncMultiTest (dart-lang/co19#2406) 2023-11-30 sgrekhov22@gmail.com dart-lang/co19#2398. Remove excessive async. Add explicit `void` (dart-lang/co19#2400) 2023-11-28 sgrekhov22@gmail.com dart-lang/co19#2350. Update existing factory constructor tests. Part 1 (dart-lang/co19#2353) 2023-11-28 sgrekhov22@gmail.com Fixes dart-lang/co19#2390. Add expected error to static_analysis_extension_types_A30_t02.dart (dart-lang/co19#2401) 2023-11-28 sgrekhov22@gmail.com Fixes dart-lang/co19#2399. Update expected errors locations for CFE (dart-lang/co19#2402) 2023-11-24 sgrekhov22@gmail.com dart-lang/co19#2388. Rename and reorder static_analysis_member_invocation_A06_t* tests (dart-lang/co19#2397) Change-Id: Ie4b51caa12a9a0896c893cc02b099a07ef09fbd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339560 Reviewed-by: Alexander Thomas <athom@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Commit-Queue: Erik Ernst <eernst@google.com>
2023-12-07 sgrekhov22@gmail.com Fixes dart-lang/co19#2413. Add missing expected compile-time errors for CFE (dart-lang/co19#2418) 2023-12-07 sgrekhov22@gmail.com dart-lang/co19#2119. Run dart formatter on LibTest/async tests (dart-lang/co19#2417) 2023-12-06 sgrekhov22@gmail.com dart-lang/co19#2398. Make asyncStart/End() safe in LibTest/async (dart-lang/co19#2416) 2023-12-06 sgrekhov22@gmail.com Fixes dart-lang/co19#2355. Add more typed_date.setRange() tests (dart-lang/co19#2412) 2023-12-06 sgrekhov22@gmail.com dart-lang/co19#2404. Small code-style improvements and description update (dart-lang/co19#2414) 2023-12-04 sgrekhov22@gmail.com dart-lang/co19#2004. Add deferred libraries tests according to the changed spec (dart-lang/co19#2411) 2023-12-04 sgrekhov22@gmail.com Fixes dart-lang/co19#2383. Add more constant evaluation tests (dart-lang/co19#2396) Change-Id: I15e0d681538fa0f2a311f74d1930fad7270b81a0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340561 Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
@sgrekhov
They should consistently fail but the fact that they can sometimes pass leads me to believe that they might complete without running the code or recognizing the failure. It makes me question the reliability of the asyncStart/End guards. Can you think of other explanations? Since the API simply doesn't exist I'm going to start skipping these tests on those browsers but I wanted to call out this observation. |
@nshahan where do you see these flaky results? According to the https://dart-current-results.web.app/#/filter=co19/LibTest/html/Element/,co19/LibTest/html/IFrameElement/ all of these tests are not flaky but fail with |
…e it is not defined
How did you determine they are flaky?
The go/dart-current-results page seems to indicate they consistently pass. When SQL querying the test results from => @nshahan Can it be that it's actually flakily timeout instead of failing? /cc @athomas The |
I keep seeing them turn our bots red from time to time when they change from
Oh good intuition! They are never actually passing. Sorry about that assumption. Sometimes they get the Runtime error I would expect and sometimes they timeout. You can see an example of oscillating between flaky and RuntimeError here: |
With this change these tests should start passing |
@nshahan @sgrekhov The |
If there is nothing to tests in some brausers why the tests should fail? And the change (already commited but I can revert it if needed) should fix the flakeness. IMHO it's fine |
In general our tests should test the behavior we want/expect. So if an implementation doesn't adhere to this behavior/spec, the test should fail. This way we can go to our test results database and check: Are e.g. touch events working on all browsers? And we'll see all the browsers where they work and those where they don't work (Instead of seeing all touch event tests passing, giving us the illusion of this working everywhere - even though on some browsers the API throws) There's a gray line when APIs are e.g. optional (e.g. not in official W3C spec, ...). Since it's web-specific, I'll leave this to web team @nshahan @sigmundch. |
We have several tests where a specific behavior is expected based on the number semantics. They would make the distinction that some configurations have web numbers and others have native numbers, and the expectations differ. So perhaps we need to make more than one distinction:
In the former case we just need a run-time test that determines which kind of configuration we're currently running, or we may have several tests that are only executed with specific configurations (using status files, no less ;-). If we have a situation like the latter then we could have a test that expects the known outcome (e.g., it could expect that there's a timeout, or the browser crashes with a bus error, or whatever), but the test runner doesn't (perhaps can't) support that. So even though item 2 looks like a special case of item 1, we may not be able to test it in the usual way. Next, even if we can arrange for every test succeeding on every configuration (that is, it works, or we expect that it crashes and it actually crashes, etc.), the information about known deficiencies of specific platforms/tools is still implicit. It seems likely that we'd want some kind of provenance for this. E.g., it could be useful to be able to query things like "which features are known to be broken with this and that specific browser", in particular if the status changes and a bunch of tests need to be updated. A bit like the approval associations where a test failure should allow us to look up the issue where that failure is being addressed. In any case, I'm not convinced that we should consider a test failure to be a normal behavior that nobody should ever bother to look into. |
2024-09-10 sgrekhov22@gmail.com Fixes dart-lang/co19#2852. Fix the new roll failures (dart-lang/co19#2853) 2024-09-09 sgrekhov22@gmail.com dart-lang/co19#2825. Add scope tests. Part 2. (dart-lang/co19#2847) 2024-09-09 sgrekhov22@gmail.com Fixes dart-lang/co19#2849. Fix new roll failures (dart-lang/co19#2850) 2024-09-09 sgrekhov22@gmail.com dart-lang/co19#2559. Replace augmentation libraries by parts (dart-lang/co19#2848) 2024-09-05 sgrekhov22@gmail.com dart-lang/co19#2825. Add scope tests. Part 1. (dart-lang/co19#2845) 2024-09-04 sgrekhov22@gmail.com dart-lang/co19#2398. Update TouchEvent tests to not fail on platforms where it is not defined (dart-lang/co19#2844) 2024-09-03 sgrekhov22@gmail.com dart-lang/co19#2825. Add import inheritance and grammar tests (dart-lang/co19#2843) 2024-09-02 sgrekhov22@gmail.com dart-lang/co19#2559. Add augmenting members tests. Part 2 (dart-lang/co19#2799) 2024-09-02 sgrekhov22@gmail.com dart-lang/co19#2825. Add enhanced parts tests for top-level declarations and ownership (dart-lang/co19#2842) 2024-09-01 49699333+dependabot[bot]@users.noreply.github.com Bump actions/setup-java from 4.2.1 to 4.2.2 in the github-actions group (dart-lang/co19#2841) 2024-08-30 sgrekhov22@gmail.com dart-lang/co19#2559. Add extension types to augmenting types tests (dart-lang/co19#2839) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: I26f83579708b877918b5a0a904f8172aa1cf4724 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384480 Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
While debugging dart-lang/sdk#54140 @mkustermann realized that some of the async tests in co19 are missing
asyncStart
andasyncEnd
:When testing in the browser, without
asyncStart
andasyncEnd
, the test driver is not waiting for the test to finish and declaring a success even when the test actually fails.I quickly searched for all the files with an async
main
and anasyncStart
, and when I compared the outputs I see that there are dozens of files wheremain
is async but the file doesn't haveasyncStart
. For example:I used
ag -Q 'main() async' -c
to find tests withasync main
andag -Q 'asyncStart' -c
to find the tests withasyncStart
. (I think it might make sense to search forawait
instead ofmain() async
).The text was updated successfully, but these errors were encountered: