使用"karate.callSingle"升级到Karate 1.0问题 [英] Upgrade to Karate 1.0 issues with "karate.callSingle"
问题描述
我正尝试将空手道从0.9.6升级到1.0.0,并开始在新的JS引擎中遇到一些问题.
I am trying to upgrade Karate from version 0.9.6 to 1.0.0 and started to have some issues with the new JS engine.
01: karate.callSingle('classpath:commons/product/CreateProductTestDataForCurrentTenant.feature')
<<<<
org.graalvm.polyglot.PolyglotException: Multi threaded access requested by thread Thread[pool-1-thread-4,5,main] but is not allowed for language(s) js.
- com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:132)
- com.oracle.truffle.polyglot.PolyglotContextImpl.throwDeniedThreadAccess(PolyglotContextImpl.java:727)
- com.oracle.truffle.polyglot.PolyglotContextImpl.checkAllThreadAccesses(PolyglotContextImpl.java:627)
- com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:526)
- com.oracle.truffle.polyglot.PolyglotEngineImpl.enter(PolyglotEngineImpl.java:1857)
- com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:104)
- org.graalvm.polyglot.Value.canExecute(Value.java:434)
这适用于0.9.6版
是否缺少一些其他配置才能使其正常工作?我在升级指南中找不到任何提及.
Is some additional config missing to making it work? I could not find any mention to it in the upgrade guide.
推荐答案
这很可能是一个错误-我们担心的一个极端情况.到目前为止,我们在这里有一份报告: https://github.com/intuit/karate/issues/1515#issuecomment-799145191
This is quite likely a bug - and an edge case we had concerns about. We've got one report so far here: https://github.com/intuit/karate/issues/1515#issuecomment-799145191
因此,如果您可以按照以下过程提供一种复制方法,将会非常有用:
So it would be tremendously helpful if you can provide a way to replicate, following this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
一个建议是在 callSingle()
的结果中不要返回JS函数,尝试坚持纯"或纯".数据或JSON.
One recommendation is do not return JS functions in the results of callSingle()
try to stick to "pure" data or JSON.
这篇关于使用"karate.callSingle"升级到Karate 1.0问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!