Don Olmstead
2016-01-12 22:07:39 UTC
I have a library that I'm attempting to use the coverage package with. This
library does code generation so I've been running tests on the generated
code in an isolate to make sure that the generated code is functioning
properly. I can run the tests using the following
dart --observe=8000 test\all.dart
And get coverage using
pub global run coverage:collect_coverage --port=8000 -o coverage.json --
resume-isolates
In this configuration however I get the following error from that command.
JsonRpcError: VM must be paused (101)
dart:async _Completer.completeError
package:coverage/src/devtools.dart 227 _Connection._handleResponse
===== asynchronous gap ===========================
dart:io _WebSocketImpl.listen
package:coverage/src/devtools.dart 184 _Connection._Connection
package:coverage/src/devtools.dart 191 _Connection.connect.<async>
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:coverage/src/devtools.dart _Connection.connect
package:coverage/src/devtools.dart 93 VMService.
connectToVMWebsocket.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/devtools.dart VMService.
connectToVMWebsocket
package:coverage/src/devtools.dart 89 VMService.connect.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/devtools.dart VMService.connect
package:coverage/src/collect.dart 17 collect.<async>.<fn>
package:coverage/src/util.dart 38 retry.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:coverage retry.<async>.<fn>
package:coverage/src/util.dart 17 retry.<async>._withTimeout
package:coverage/src/util.dart 35 retry.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/util.dart retry
package:coverage/src/collect.dart 16 collect.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/collect.dart collect
http://localhost:50032/collect_coverage.dart 21 main.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:stack_trace Chain.capture
http://localhost:50032/collect_coverage.dart 20 main.<async>
If I keep running the command eventually, three times total, a coverage
report gets generated. Not entirely sure if everything's there for it but
I'm able to take it and turn it into LCOV format.
Anyways I'm not sure if I should be running the root tests in a special way
to handle this case. Any ideas? On Winders if it matters any.
library does code generation so I've been running tests on the generated
code in an isolate to make sure that the generated code is functioning
properly. I can run the tests using the following
dart --observe=8000 test\all.dart
And get coverage using
pub global run coverage:collect_coverage --port=8000 -o coverage.json --
resume-isolates
In this configuration however I get the following error from that command.
JsonRpcError: VM must be paused (101)
dart:async _Completer.completeError
package:coverage/src/devtools.dart 227 _Connection._handleResponse
===== asynchronous gap ===========================
dart:io _WebSocketImpl.listen
package:coverage/src/devtools.dart 184 _Connection._Connection
package:coverage/src/devtools.dart 191 _Connection.connect.<async>
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:coverage/src/devtools.dart _Connection.connect
package:coverage/src/devtools.dart 93 VMService.
connectToVMWebsocket.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/devtools.dart VMService.
connectToVMWebsocket
package:coverage/src/devtools.dart 89 VMService.connect.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/devtools.dart VMService.connect
package:coverage/src/collect.dart 17 collect.<async>.<fn>
package:coverage/src/util.dart 38 retry.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:coverage retry.<async>.<fn>
package:coverage/src/util.dart 17 retry.<async>._withTimeout
package:coverage/src/util.dart 35 retry.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/util.dart retry
package:coverage/src/collect.dart 16 collect.<async>
===== asynchronous gap ===========================
dart:async Future.Future.microtask
package:coverage/src/collect.dart collect
http://localhost:50032/collect_coverage.dart 21 main.<async>.<fn>.<async>
===== asynchronous gap ===========================
package:stack_trace Chain.capture
http://localhost:50032/collect_coverage.dart 20 main.<async>
If I keep running the command eventually, three times total, a coverage
report gets generated. Not entirely sure if everything's there for it but
I'm able to take it and turn it into LCOV format.
Anyways I'm not sure if I should be running the root tests in a special way
to handle this case. Any ideas? On Winders if it matters any.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.