本文介绍了从IntelliJ运行Corda流测试时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我从IntelliJ运行Corda流测试时,测试失败,并出现以下错误:
When I run Corda flow tests from IntelliJ, the tests fail with the following errors:
和
我该如何解决?
推荐答案
Corda流需要在运行前使用Quasar进行检测,以便可以在执行中暂停。
Corda flows need to be instrumented using Quasar before they are run, so that they can be suspended mid-execution.
要在IntelliJ中实现此目的,您需要:
To achieve this in IntelliJ, you need to:
- 为测试创建运行配置
- 打开运行配置并将VM选项更改为
-ea -javaagent:PATH-TO-QUASAR-JAR
- 在CorDapp示例和模板中,
quasar.jar
位于lib / quasar.jar
,因此您d使用-ea -javaagent:../ lib / quasar.jar
- Create a run config for your tests
- Open the run config and change the VM options to
-ea -javaagent:PATH-TO-QUASAR-JAR
- In the CorDapp example and templates,
quasar.jar
is located atlib/quasar.jar
, so you'd use-ea -javaagent:../lib/quasar.jar
或者,您可以编辑默认的JUnit运行配置,以默认情况下使用Quasar javaagent,避免您不必这样做在您选择要运行的新测试时。
Alternatively, you can edit the default JUnit run config to use the Quasar javaagent by default, avoiding you having to do this every time you pick a new test to run.
这篇关于从IntelliJ运行Corda流测试时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- In the CorDapp example and templates,
- 在CorDapp示例和模板中,