Skip to content
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

Open
osa1 opened this issue Nov 27, 2023 · 1 comment
Open

Some async tests are missing asyncStart/asyncEnd #2398

osa1 opened this issue Nov 27, 2023 · 1 comment
Assignees
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good

Comments

@osa1
Copy link
Member

osa1 commented Nov 27, 2023

While debugging dart-lang/sdk#54140 @mkustermann realized that some of the async tests in co19 are missing asyncStart and asyncEnd:

When testing in the browser, without asyncStart and asyncEnd, 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 an asyncStart, and when I compared the outputs I see that there are dozens of files where main is async but the file doesn't have asyncStart. For example:

  • LanguageFeatures/Control-flow-collections/dynamic_semantics_list_A03_t02.dart
  • Language/Statements/For/Asynchronous_For_in/execution_A02_t01.dart

I used ag -Q 'main() async' -c to find tests with async main and ag -Q 'asyncStart' -c to find the tests with asyncStart. (I think it might make sense to search for await instead of main() async).

@sgrekhov sgrekhov self-assigned this Nov 27, 2023
@sgrekhov sgrekhov added the bad-test Report tests in need of updates. When closed, the tests should be considered good label Nov 27, 2023
sgrekhov added a commit to sgrekhov/co19 that referenced this issue Nov 27, 2023
@sgrekhov
Copy link
Contributor

@osa1 thank you! I added some missed asyncStart/End(). It's not supposed that all async test should have asyncStart/End(). Tests like

main() async {
  await test1();
  ...
  await test2();
}

don't need asyncStart/End(). But I found a lot of tests that have excessive async.

eernstg pushed a commit that referenced this issue Nov 30, 2023
Remove excessive `async`. Add an explicit return type in declarations of `main` that had none.
eernstg pushed a commit that referenced this issue Nov 30, 2023
…ncMultiTest (#2406)

Update asyncStart/End() to correspond SDK version. Replace asyncMultiStart by asyncStart.
sgrekhov added a commit to sgrekhov/co19 that referenced this issue Dec 1, 2023
eernstg pushed a commit that referenced this issue Dec 1, 2023
…guage and LanguageFeatures tests (#2407)

Update async tests to avoid false-positive results on web, Language and LanguageFeatures tests
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Dec 4, 2023
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>
sgrekhov added a commit to sgrekhov/co19 that referenced this issue Dec 6, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Dec 11, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good
Projects
None yet
Development

No branches or pull requests

2 participants