sdk icon indicating copy to clipboard operation
sdk copied to clipboard

2 packages failing dart2wasm tests

Open kevmoo opened this issue 1 year ago • 9 comments

Reproduction: clone, dart pub get, dart test -p chrome --compiler dart2wasm

  • [x] pkg:crypto - almost all tests fail due to time outs
    • [x] Waiting for dev SDK to roll to land PR - https://github.com/dart-lang/crypto/pull/162
  • [ ] pkg:async - one tests fail
test/subscription_stream_test.dart: cancelOnError source: no: - subscriptionStream: no [E]
  Expected: [1, 2, 'To err is divine!', 4]
    Actual: [1, 2, 'To err is divine!']
     Which: at location [3] is [1, 2, 'To err is divine!'] which shorter than expected

kevmoo avatar Feb 01 '24 20:02 kevmoo

@kevmoo Could you provide instructions on how to run those tests?

mkustermann avatar Feb 01 '24 20:02 mkustermann

done!

kevmoo avatar Feb 01 '24 20:02 kevmoo

Also landed cl/350322 for perf fix.

mkustermann avatar Feb 06 '24 11:02 mkustermann

pkg:crypto tests all pass now! 🥳

kevmoo avatar Feb 06 '24 15:02 kevmoo

@mkustermann – still getting ONE failure (due to timeouts) on crypto: https://github.com/dart-lang/crypto/actions/runs/7801915494/job/21380589146#step:7:674

kevmoo avatar Feb 08 '24 20:02 kevmoo

@kevmoo I can have a look. For me all package:crypto tests passed locally, may be flaky or a perf issue. For package:async there is now one failure remaining, it's a async* semantics issue that's somewhat very rare, I'll have to see how much work it is to fix and whether it makes sense to prioritize it now or not.

mkustermann avatar Feb 08 '24 20:02 mkustermann

@mkustermann – still getting ONE failure (due to timeouts) on crypto: https://github.com/dart-lang/crypto/actions/runs/7801915494/job/21380589146#step:7:674

The error message from this link seems to be

[Chrome, Dart2Wasm] loading test/hmac_sha2_test.dart (failed)
  Failed to load "test/hmac_sha2_test.dart":
  Timed out waiting for browser to load test suite.

It says it timed out waiting for the test suite to load, not even to run it. Could this be some flaky infra issue?

For me all tests pass just fine (also when running the failing test from your link individually) using origin/main of Dart SDK

<sdk>/third_party/pkg/crypto % xvfb-run -a dart test -p chrome --compiler dart2wasm                           
Building package executable... 
Built test:test.
01:02 +822: All tests passed!                                                                  

<sdk>/third_party/pkg/crypto % xvfb-run -a dart test -p chrome --compiler dart2wasm test/hmac_sha2_test.dart  
Building package executable... (4.7s)
Built test:test.
00:02 +7: All tests passed!                  

mkustermann avatar Feb 08 '24 22:02 mkustermann

using -j 1 also helps. (which is similar to running just one test directly)

It seems that the large fire produces correct hash test is randomly slow with wasm.

kevmoo avatar Feb 08 '24 23:02 kevmoo

Crypto is working and committed!

kevmoo avatar Feb 08 '24 23:02 kevmoo

With the current SDK main branch async tests also pass:

$ dart test -p chrome --compiler dart2wasm
Building package executable... (3.9s)
Built test:test.
00:06 +290: [Chrome, Dart2Wasm] test/stream_queue_test.dart: startTransaction operation produces a transaction that when rejected can reject a transaction where one copy is fully consumed in a transaction and a second copy is made
  Skip: https://github.com/dart-lang/async/issues/229
00:14 +606 ~1: All tests passed!

osa1 avatar Mar 06 '24 09:03 osa1

well done!

kevmoo avatar Mar 06 '24 16:03 kevmoo