Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 102adef

Browse files
jakemac53John Messerly
authored and
John Messerly
committed
expose AsyncMessageGrouper and SyncMessageGrouper in the testing library (#3)
1 parent dd67b90 commit 102adef

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.1.1
2+
3+
* Export `AsyncMessageGrouper` and `SyncMessageGrouper` as part of the testing
4+
library. These can assist when writing e2e tests and communicating with a
5+
worker process.
6+
17
## 0.1.0
28

39
* Initial version.

lib/src/async_message_grouper.dart

+3
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ class AsyncMessageGrouper implements MessageGrouper {
4141

4242
return message;
4343
}
44+
45+
/// Stop listening to the stream for further updates.
46+
Future cancel() => _inputQueue.cancel();
4447
}

lib/testing.dart

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'dart:io';
88

99
import 'package:bazel_worker/bazel_worker.dart';
1010

11+
export 'src/async_message_grouper.dart';
12+
export 'src/sync_message_grouper.dart';
1113
export 'src/utils.dart' show protoToDelimitedBuffer;
1214

1315
/// Interface for a mock [Stdin] object that allows you to add bytes manually.

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: bazel_worker
2-
version: 0.1.0
2+
version: 0.1.1
33
description: Tools for creating a bazel persistent worker.
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/bazel_worker

0 commit comments

Comments
 (0)