Skip to content

Calling both callbackDone and reportTestError has weird behavior #2978

Closed
@nex3

Description

@nex3

Consider the following test code:

  asyncTest('test 1', 1, () {
    new Timer(1, (_) {
      reportTestError('error', '');
      callbackDone();
    });
  });

  asyncTest('test 2', 1, () {
    new Timer(1, (_) {
      reportTestError('error', '');
      callbackDone();
    });
  });

This will report an error for test 1, but it will report test 2 as passing. If the callbackDone call is removed, then both tests are reported as failing.

Ideally, callbackDone could be called after reportTestError to allow for asynchronous post-test cleanup. Failing that, though, it would be nice for this to have a descriptive error message.

Metadata

Metadata

Assignees

Labels

area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).closed-obsoleteClosed as the reported issue is no longer relevant

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions