test(chat): await request events and settle file operations
Gitea CI / Build Android APK (pull_request) Successful in 3m58s
Gitea CI / Audit and package Windows x64 (pull_request) Successful in 1m26s
Gitea CI / Assemble and validate CI artifacts (pull_request) Successful in 46s
Gitea CI / Gitea CI passed (pull_request) Successful in 2s
Gitea CI / Check code and tests (pull_request) Successful in 5m47s
Gitea CI / Build Windows x64 app (pull_request) Successful in 2m49s
Gitea CI / Build Android APK (pull_request) Successful in 3m58s
Gitea CI / Audit and package Windows x64 (pull_request) Successful in 1m26s
Gitea CI / Assemble and validate CI artifacts (pull_request) Successful in 46s
Gitea CI / Gitea CI passed (pull_request) Successful in 2s
Gitea CI / Check code and tests (pull_request) Successful in 5m47s
Gitea CI / Build Windows x64 app (pull_request) Successful in 2m49s
This commit is contained in:
1 parent
1eee8007e3
commit
d81c4b19d7
1 file changed
+124
-36
+124
-36
@@ -22,6 +22,12 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
class _Model implements ModelAdapter {
|
class _Model implements ModelAdapter {
|
||||||
final requests = <ModelRequest>[];
|
final requests = <ModelRequest>[];
|
||||||
final streams = <StreamController<ModelEvent>>[];
|
final streams = <StreamController<ModelEvent>>[];
|
||||||
|
final _requestWaiters = <int, Completer<void>>{};
|
||||||
|
|
||||||
|
Future<void> waitForRequests(int count) {
|
||||||
|
if (requests.length >= count) return Future<void>.value();
|
||||||
|
return _requestWaiters.putIfAbsent(count, Completer<void>.new).future;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Stream<ModelEvent> stream(
|
Stream<ModelEvent> stream(
|
||||||
@@ -31,6 +37,9 @@ class _Model implements ModelAdapter {
|
|||||||
requests.add(request);
|
requests.add(request);
|
||||||
final stream = StreamController<ModelEvent>();
|
final stream = StreamController<ModelEvent>();
|
||||||
streams.add(stream);
|
streams.add(stream);
|
||||||
|
for (final count in _requestWaiters.keys.toList()) {
|
||||||
|
if (requests.length >= count) _requestWaiters.remove(count)!.complete();
|
||||||
|
}
|
||||||
unawaited(cancellation.whenCancelled.then((_) => stream.close()));
|
unawaited(cancellation.whenCancelled.then((_) => stream.close()));
|
||||||
return stream.stream;
|
return stream.stream;
|
||||||
}
|
}
|
||||||
@@ -82,12 +91,46 @@ class _DelayedRestoreConversation extends AgentConversationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _until(bool Function() check) async {
|
Future<void> _waitForRequests(
|
||||||
for (var attempt = 0; attempt < 1000; attempt++) {
|
ProviderContainer container,
|
||||||
if (check()) return;
|
ChatControllerProvider provider,
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 1));
|
_Model model,
|
||||||
|
int count,
|
||||||
|
) async {
|
||||||
|
if (model.requests.length >= count) return;
|
||||||
|
final settled = Completer<void>();
|
||||||
|
void onState(ChatState state) {
|
||||||
|
if (!state.busy && model.requests.length < count && !settled.isCompleted) {
|
||||||
|
settled.completeError(
|
||||||
|
TestFailure('Send settled before model request $count: ${state.error}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final subscription = container.listen(provider, (_, state) => onState(state));
|
||||||
|
onState(container.read(provider));
|
||||||
|
try {
|
||||||
|
await Future.any([model.waitForRequests(count), settled.future]);
|
||||||
|
} finally {
|
||||||
|
subscription.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _waitForState(
|
||||||
|
ProviderContainer container,
|
||||||
|
ChatControllerProvider provider,
|
||||||
|
bool Function(ChatState) check,
|
||||||
|
) async {
|
||||||
|
if (check(container.read(provider))) return;
|
||||||
|
final ready = Completer<void>();
|
||||||
|
final subscription = container.listen(provider, (_, state) {
|
||||||
|
if (check(state) && !ready.isCompleted) ready.complete();
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
await ready.future;
|
||||||
|
} finally {
|
||||||
|
subscription.close();
|
||||||
}
|
}
|
||||||
fail('Expected state was not reached');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@@ -95,6 +138,7 @@ void main() {
|
|||||||
late Directory conversationsRoot;
|
late Directory conversationsRoot;
|
||||||
late ConversationRepository conversationRepository;
|
late ConversationRepository conversationRepository;
|
||||||
late ProviderContainer container;
|
late ProviderContainer container;
|
||||||
|
late AgentConversationRegistry registry;
|
||||||
setUp(() async {
|
setUp(() async {
|
||||||
model = _Model();
|
model = _Model();
|
||||||
conversationsRoot = await Directory.systemTemp.createTemp('chat-test-');
|
conversationsRoot = await Directory.systemTemp.createTemp('chat-test-');
|
||||||
@@ -131,8 +175,11 @@ void main() {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
registry = container.read(agentConversationRegistryProvider);
|
||||||
});
|
});
|
||||||
tearDown(() async {
|
tearDown(() async {
|
||||||
|
// Disposal initiates cancellation, but files remain open until the run settles.
|
||||||
|
await registry.cancelAll();
|
||||||
container.dispose();
|
container.dispose();
|
||||||
await conversationsRoot.delete(recursive: true);
|
await conversationsRoot.delete(recursive: true);
|
||||||
});
|
});
|
||||||
@@ -391,7 +438,12 @@ void main() {
|
|||||||
);
|
);
|
||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
await tester.tap(find.byTooltip('发送消息'));
|
await tester.tap(find.byTooltip('发送消息'));
|
||||||
await _until(() => model.requests.isNotEmpty);
|
await _waitForRequests(
|
||||||
|
container,
|
||||||
|
chatControllerProvider('lib'),
|
||||||
|
model,
|
||||||
|
1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(model.requests.single.messages.single.text, '测试发送');
|
expect(model.requests.single.messages.single.text, '测试发送');
|
||||||
@@ -461,11 +513,10 @@ void main() {
|
|||||||
);
|
);
|
||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
model.streams.single.add(const TextDelta('正在生成的内容'));
|
model.streams.single.add(const TextDelta('正在生成的内容'));
|
||||||
await _until(
|
await _waitForState(
|
||||||
() => container
|
container,
|
||||||
.read(chatControllerProvider('lib'))
|
chatControllerProvider('lib'),
|
||||||
.partialResponse
|
(state) => state.partialResponse.isNotEmpty,
|
||||||
.isNotEmpty,
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
@@ -473,7 +524,11 @@ void main() {
|
|||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
await tester.tap(find.byTooltip('停止回复'));
|
await tester.tap(find.byTooltip('停止回复'));
|
||||||
await container.read(chatControllerProvider('lib').notifier).stop();
|
await container.read(chatControllerProvider('lib').notifier).stop();
|
||||||
await _until(() => !container.read(chatControllerProvider('lib')).busy);
|
await _waitForState(
|
||||||
|
container,
|
||||||
|
chatControllerProvider('lib'),
|
||||||
|
(state) => !state.busy,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(find.text('回复已中断'), findsOneWidget);
|
expect(find.text('回复已中断'), findsOneWidget);
|
||||||
@@ -514,7 +569,11 @@ void main() {
|
|||||||
addTearDown(subscription.close);
|
addTearDown(subscription.close);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.runAsync(
|
await tester.runAsync(
|
||||||
() => _until(() => isolated.read(provider).messages.length == 2),
|
() => _waitForState(
|
||||||
|
isolated,
|
||||||
|
provider,
|
||||||
|
(state) => state.messages.length == 2,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
final controller = isolated.read(provider.notifier);
|
final controller = isolated.read(provider.notifier);
|
||||||
expect(isolated.read(provider).messages.last.elapsedMs, 23000);
|
expect(isolated.read(provider).messages.last.elapsedMs, 23000);
|
||||||
@@ -621,7 +680,12 @@ void main() {
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
await tester.tap(find.byTooltip('发送消息'));
|
await tester.tap(find.byTooltip('发送消息'));
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(
|
||||||
|
container,
|
||||||
|
chatControllerProvider('project'),
|
||||||
|
model,
|
||||||
|
1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.byKey(const Key('test-project-selector')), findsNothing);
|
expect(find.byKey(const Key('test-project-selector')), findsNothing);
|
||||||
@@ -629,8 +693,10 @@ void main() {
|
|||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
model.streams.single.add(ModelResponse(text: '已经开始'));
|
model.streams.single.add(ModelResponse(text: '已经开始'));
|
||||||
await model.streams.single.close();
|
await model.streams.single.close();
|
||||||
await _until(
|
await _waitForState(
|
||||||
() => !container.read(chatControllerProvider('project')).busy,
|
container,
|
||||||
|
chatControllerProvider('project'),
|
||||||
|
(state) => !state.busy,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
@@ -697,7 +763,12 @@ void main() {
|
|||||||
);
|
);
|
||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
await tester.sendKeyEvent(LogicalKeyboardKey.enter);
|
await tester.sendKeyEvent(LogicalKeyboardKey.enter);
|
||||||
await _until(() => model.requests.isNotEmpty);
|
await _waitForRequests(
|
||||||
|
container,
|
||||||
|
chatControllerProvider('lib'),
|
||||||
|
model,
|
||||||
|
1,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(
|
expect(
|
||||||
@@ -709,7 +780,11 @@ void main() {
|
|||||||
await tester.runAsync(() async {
|
await tester.runAsync(() async {
|
||||||
model.streams.single.add(ModelResponse(text: 'ok'));
|
model.streams.single.add(ModelResponse(text: 'ok'));
|
||||||
await model.streams.single.close();
|
await model.streams.single.close();
|
||||||
await _until(() => !container.read(chatControllerProvider('lib')).busy);
|
await _waitForState(
|
||||||
|
container,
|
||||||
|
chatControllerProvider('lib'),
|
||||||
|
(state) => !state.busy,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(tester.takeException(), isNull);
|
expect(tester.takeException(), isNull);
|
||||||
@@ -725,11 +800,15 @@ void main() {
|
|||||||
addTearDown(subscription.close);
|
addTearDown(subscription.close);
|
||||||
final controller = container.read(provider.notifier);
|
final controller = container.read(provider.notifier);
|
||||||
final sending = controller.send('你好', timelineId: 'first');
|
final sending = controller.send('你好', timelineId: 'first');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
await controller.send('重复', timelineId: 'first');
|
await controller.send('重复', timelineId: 'first');
|
||||||
expect(model.requests, hasLength(1));
|
expect(model.requests, hasLength(1));
|
||||||
model.streams[0].add(const TextDelta('你好呀'));
|
model.streams[0].add(const TextDelta('你好呀'));
|
||||||
await _until(() => container.read(provider).partialResponse == '你好呀');
|
await _waitForState(
|
||||||
|
container,
|
||||||
|
provider,
|
||||||
|
(state) => state.partialResponse == '你好呀',
|
||||||
|
);
|
||||||
expect(container.read(provider).busy, isTrue);
|
expect(container.read(provider).busy, isTrue);
|
||||||
model.streams[0].add(ModelResponse(text: '你好呀!'));
|
model.streams[0].add(ModelResponse(text: '你好呀!'));
|
||||||
await model.streams[0].close();
|
await model.streams[0].close();
|
||||||
@@ -738,7 +817,7 @@ void main() {
|
|||||||
expect(container.read(provider).partialResponse, isEmpty);
|
expect(container.read(provider).partialResponse, isEmpty);
|
||||||
|
|
||||||
final second = controller.send('接着说', timelineId: 'second');
|
final second = controller.send('接着说', timelineId: 'second');
|
||||||
await _until(() => model.requests.length == 2);
|
await _waitForRequests(container, provider, model, 2);
|
||||||
expect(model.requests[1].messages.map((m) => m.text), [
|
expect(model.requests[1].messages.map((m) => m.text), [
|
||||||
'你好',
|
'你好',
|
||||||
'你好呀!',
|
'你好呀!',
|
||||||
@@ -758,7 +837,7 @@ void main() {
|
|||||||
final other = container
|
final other = container
|
||||||
.read(otherProvider.notifier)
|
.read(otherProvider.notifier)
|
||||||
.send('新会话', timelineId: 'timeline');
|
.send('新会话', timelineId: 'timeline');
|
||||||
await _until(() => model.requests.length == 3);
|
await _waitForRequests(container, otherProvider, model, 3);
|
||||||
expect(model.requests.last.messages.map((m) => m.text), ['新会话']);
|
expect(model.requests.last.messages.map((m) => m.text), ['新会话']);
|
||||||
model.streams[2].add(ModelResponse(text: '新回答'));
|
model.streams[2].add(ModelResponse(text: '新回答'));
|
||||||
await model.streams[2].close();
|
await model.streams[2].close();
|
||||||
@@ -773,16 +852,20 @@ void main() {
|
|||||||
addTearDown(subscription.close);
|
addTearDown(subscription.close);
|
||||||
final controller = container.read(provider.notifier);
|
final controller = container.read(provider.notifier);
|
||||||
final sending = controller.send('开始', timelineId: 'timeline');
|
final sending = controller.send('开始', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
model.streams[0].add(const TextDelta('部分回复'));
|
model.streams[0].add(const TextDelta('部分回复'));
|
||||||
await _until(() => container.read(provider).partialResponse.isNotEmpty);
|
await _waitForState(
|
||||||
|
container,
|
||||||
|
provider,
|
||||||
|
(state) => state.partialResponse.isNotEmpty,
|
||||||
|
);
|
||||||
controller.stop();
|
controller.stop();
|
||||||
await sending;
|
await sending;
|
||||||
expect(container.read(provider).busy, isFalse);
|
expect(container.read(provider).busy, isFalse);
|
||||||
expect(container.read(provider).messages.last.text, '部分回复');
|
expect(container.read(provider).messages.last.text, '部分回复');
|
||||||
expect(container.read(provider).messages.last.interrupted, isTrue);
|
expect(container.read(provider).messages.last.interrupted, isTrue);
|
||||||
final next = controller.send('再来', timelineId: 'timeline');
|
final next = controller.send('再来', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.length == 2);
|
await _waitForRequests(container, provider, model, 2);
|
||||||
model.streams[1].add(ModelResponse(text: '完成'));
|
model.streams[1].add(ModelResponse(text: '完成'));
|
||||||
await model.streams[1].close();
|
await model.streams[1].close();
|
||||||
await next;
|
await next;
|
||||||
@@ -805,14 +888,14 @@ void main() {
|
|||||||
final first = container
|
final first = container
|
||||||
.read(firstProvider.notifier)
|
.read(firstProvider.notifier)
|
||||||
.send('第一条', timelineId: 'timeline');
|
.send('第一条', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.length == 1);
|
await _waitForRequests(container, firstProvider, model, 1);
|
||||||
model.streams[0].add(ModelResponse(text: '第一答'));
|
model.streams[0].add(ModelResponse(text: '第一答'));
|
||||||
await model.streams[0].close();
|
await model.streams[0].close();
|
||||||
await first;
|
await first;
|
||||||
final second = container
|
final second = container
|
||||||
.read(secondProvider.notifier)
|
.read(secondProvider.notifier)
|
||||||
.send('第二条', timelineId: 'timeline');
|
.send('第二条', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.length == 2);
|
await _waitForRequests(container, secondProvider, model, 2);
|
||||||
expect(model.requests[1].messages.map((message) => message.text), ['第二条']);
|
expect(model.requests[1].messages.map((message) => message.text), ['第二条']);
|
||||||
model.streams[1].add(ModelResponse(text: '第二答'));
|
model.streams[1].add(ModelResponse(text: '第二答'));
|
||||||
await model.streams[1].close();
|
await model.streams[1].close();
|
||||||
@@ -835,7 +918,7 @@ void main() {
|
|||||||
final first = container
|
final first = container
|
||||||
.read(provider.notifier)
|
.read(provider.notifier)
|
||||||
.send('保留这段对话', timelineId: 'timeline');
|
.send('保留这段对话', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
model.streams.single.add(ModelResponse(text: '已经保存'));
|
model.streams.single.add(ModelResponse(text: '已经保存'));
|
||||||
await model.streams.single.close();
|
await model.streams.single.close();
|
||||||
await first;
|
await first;
|
||||||
@@ -877,13 +960,18 @@ void main() {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
registry = container.read(agentConversationRegistryProvider);
|
||||||
final restoredProvider = chatControllerProvider(
|
final restoredProvider = chatControllerProvider(
|
||||||
'project',
|
'project',
|
||||||
conversationId: conversationId,
|
conversationId: conversationId,
|
||||||
);
|
);
|
||||||
subscription = container.listen(restoredProvider, (_, _) {});
|
subscription = container.listen(restoredProvider, (_, _) {});
|
||||||
addTearDown(subscription.close);
|
addTearDown(subscription.close);
|
||||||
await _until(() => container.read(restoredProvider).messages.length == 2);
|
await _waitForState(
|
||||||
|
container,
|
||||||
|
restoredProvider,
|
||||||
|
(state) => state.messages.length == 2,
|
||||||
|
);
|
||||||
expect(
|
expect(
|
||||||
container
|
container
|
||||||
.read(restoredProvider)
|
.read(restoredProvider)
|
||||||
@@ -895,7 +983,7 @@ void main() {
|
|||||||
final continued = container
|
final continued = container
|
||||||
.read(restoredProvider.notifier)
|
.read(restoredProvider.notifier)
|
||||||
.send('继续', timelineId: 'timeline');
|
.send('继续', timelineId: 'timeline');
|
||||||
await _until(() => model.requests.length == 2);
|
await _waitForRequests(container, restoredProvider, model, 2);
|
||||||
expect(model.requests.last.messages.map((message) => message.text), [
|
expect(model.requests.last.messages.map((message) => message.text), [
|
||||||
'保留这段对话',
|
'保留这段对话',
|
||||||
'已经保存',
|
'已经保存',
|
||||||
@@ -949,7 +1037,7 @@ void main() {
|
|||||||
final first = switchingContainer
|
final first = switchingContainer
|
||||||
.read(provider.notifier)
|
.read(provider.notifier)
|
||||||
.send('旧会话', timelineId: 'timeline');
|
.send('旧会话', timelineId: 'timeline');
|
||||||
await _until(() => firstModel.streams.isNotEmpty);
|
await _waitForRequests(switchingContainer, provider, firstModel, 1);
|
||||||
firstModel.streams.single.add(ModelResponse(text: '旧回答'));
|
firstModel.streams.single.add(ModelResponse(text: '旧回答'));
|
||||||
await firstModel.streams.single.close();
|
await firstModel.streams.single.close();
|
||||||
await first;
|
await first;
|
||||||
@@ -964,7 +1052,7 @@ void main() {
|
|||||||
final second = switchingContainer
|
final second = switchingContainer
|
||||||
.read(provider.notifier)
|
.read(provider.notifier)
|
||||||
.send('继续会话', timelineId: 'timeline');
|
.send('继续会话', timelineId: 'timeline');
|
||||||
await _until(() => firstModel.streams.length == 2);
|
await _waitForRequests(switchingContainer, provider, firstModel, 2);
|
||||||
expect(firstModel.requests.last.messages.map((message) => message.text), [
|
expect(firstModel.requests.last.messages.map((message) => message.text), [
|
||||||
'旧会话',
|
'旧会话',
|
||||||
'旧回答',
|
'旧回答',
|
||||||
@@ -1004,7 +1092,7 @@ void main() {
|
|||||||
final sending = container
|
final sending = container
|
||||||
.read(provider.notifier)
|
.read(provider.notifier)
|
||||||
.send('hello', timelineId: 'timeline');
|
.send('hello', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
model.streams.single.addError(entry.key);
|
model.streams.single.addError(entry.key);
|
||||||
await model.streams.single.close();
|
await model.streams.single.close();
|
||||||
await sending;
|
await sending;
|
||||||
@@ -1018,7 +1106,7 @@ void main() {
|
|||||||
addTearDown(subscription.close);
|
addTearDown(subscription.close);
|
||||||
final controller = container.read(provider.notifier);
|
final controller = container.read(provider.notifier);
|
||||||
final sending = controller.send('开始', timelineId: 'timeline');
|
final sending = controller.send('开始', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
model.streams[0].addError(StateError('sensitive remote payload'));
|
model.streams[0].addError(StateError('sensitive remote payload'));
|
||||||
await model.streams[0].close();
|
await model.streams[0].close();
|
||||||
await sending;
|
await sending;
|
||||||
@@ -1032,7 +1120,7 @@ void main() {
|
|||||||
['开始'],
|
['开始'],
|
||||||
);
|
);
|
||||||
final next = controller.send('重试', timelineId: 'timeline');
|
final next = controller.send('重试', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.length == 2);
|
await _waitForRequests(container, provider, model, 2);
|
||||||
model.streams[1].add(ModelResponse(text: '成功'));
|
model.streams[1].add(ModelResponse(text: '成功'));
|
||||||
await model.streams[1].close();
|
await model.streams[1].close();
|
||||||
await next;
|
await next;
|
||||||
@@ -1048,7 +1136,7 @@ void main() {
|
|||||||
await early;
|
await early;
|
||||||
expect(container.read(provider).busy, isFalse);
|
expect(container.read(provider).busy, isFalse);
|
||||||
final later = controller.send('再次开始', timelineId: 'timeline');
|
final later = controller.send('再次开始', timelineId: 'timeline');
|
||||||
await _until(() => model.streams.isNotEmpty);
|
await _waitForRequests(container, provider, model, 1);
|
||||||
subscription.close();
|
subscription.close();
|
||||||
container.dispose();
|
container.dispose();
|
||||||
await later;
|
await later;
|
||||||
|
|||||||
Reference in new issue
Block a user