Skip to content

Patch in the test case from the DWDS 16.0.2+1 release #1931

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

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions dwds/test/evaluate_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,32 @@ void testAll({
(instance) => instance.valueAsString, 'valueAsString', '1'));
});

test('in parallel (in a batch) handles errors', () async {
final library = isolate.rootLib!;
final missingLibId = '';
final evaluation1 = setup.service
.evaluate(isolateId, missingLibId, 'MainClass(0).toString()');
final evaluation2 = setup.service
.evaluate(isolateId, library.id!, 'MainClass(1).toString()');

final results = await Future.wait([evaluation1, evaluation2]);

expect(
results[0],
isA<ErrorRef>().having(
(instance) => instance.message,
'message',
contains('No batch result object ID'),
));
expect(
results[1],
isA<ErrorRef>().having(
(instance) => instance.message,
'message',
contains('No batch result object ID'),
));
});

test('with scope override', () async {
final library = isolate.rootLib!;
final object = await setup.service
Expand Down