at_server icon indicating copy to clipboard operation
at_server copied to clipboard

Flaky unit test: test/delete_verb_test.dart

Open cpswan opened this issue 1 month ago • 0 comments

Describe the bug

Recent runs of unit_tests (stable) frequently fail on test/delete_verb_test.dart e.g. run #1 and run #2 for #2201

❌ test/delete_verb_test.dart: A group of tests related to apkam keys expiry A test to verify delete verb fails when apkam keys are expired (failed)
  INFO|2025-01-16 00:57:06.364673|HiveBase|commit_log_5a1fff547b9dafdc95c1938a41e8951bded8a595db3a50ddf0183a67a8a05f6a initialized successfully 
  
  INFO|2025-01-16 00:57:06.366319|HiveBase|5a1fff547b9dafdc95c1938a41e8951bded8a595db3a50ddf0183a67a8a05f6a initialized successfully 
  
  Exception: Connection with enrollment ID f41ad1e1-6681-417b-bd58-89de912b0d16 is not authorized to delete key: @alice:phone.wavi@alice
  package:at_secondary/src/verb/handler/delete_verb_handler.dart 101:7   DeleteVerbHandler.processVerb
  ===== asynchronous gap ===========================
  package:at_secondary/src/verb/handler/abstract_verb_handler.dart 72:7  AbstractVerbHandler.processInternal
  ===== asynchronous gap ===========================
  test/delete_verb_test.dart 529:18                                      main.<fn>.<fn>
...
Error: 656 tests passed, 1 failed.
Error: Process completed with exit code 1.

Steps to reproduce

  1. First the automated test suite is invoked (e.g. by a Dependabot PR)
  2. Then unit_tests (stable) fail on test/delete_verb_test.dart
  3. And then tests have to be re-run (often multiple times) to get a clean run

Expected behavior

Unit tests should deterministically pass or fail

Additional context

Doesn't seem to be happening with unit_tests (beta)

cpswan avatar Jan 16 '25 10:01 cpswan