Commit 8742fb09 authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

Fix tests (#8736)

* do not forward status if stream is closed
* remove devfs test timeout
parent 74e2243c
...@@ -238,7 +238,7 @@ class AnalysisServer { ...@@ -238,7 +238,7 @@ class AnalysisServer {
void _handleStatus(Map<String, dynamic> statusInfo) { void _handleStatus(Map<String, dynamic> statusInfo) {
// {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} // {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
if (statusInfo['analysis'] != null) { if (statusInfo['analysis'] != null && !_analyzingController.isClosed) {
final bool isAnalyzing = statusInfo['analysis']['isAnalyzing']; final bool isAnalyzing = statusInfo['analysis']['isAnalyzing'];
_analyzingController.add(isAnalyzing); _analyzingController.add(isAnalyzing);
} }
......
...@@ -269,9 +269,10 @@ void main() { ...@@ -269,9 +269,10 @@ void main() {
]); ]);
expect(devFS.assetPathsToEvict, isEmpty); expect(devFS.assetPathsToEvict, isEmpty);
expect(bytes, 48); expect(bytes, 48);
}, timeout: const Timeout(const Duration(seconds: 5))); });
testUsingContext('delete dev file system', () async { testUsingContext('delete dev file system', () async {
expect(vmService.messages, isEmpty, reason: 'prior test timeout');
await devFS.destroy(); await devFS.destroy();
vmService.expectMessages(<String>['_deleteDevFS {fsName: test}']); vmService.expectMessages(<String>['_deleteDevFS {fsName: test}']);
expect(devFS.assetPathsToEvict, isEmpty); expect(devFS.assetPathsToEvict, isEmpty);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment