0

我正在尝试在我的 IntelliJ 工作区中运行https://github.com/alesj/arquillian-container-gae测试。但是它不会运行我试过:

  1. 然后将 Git 克隆导入 IntelliJ(父级)
  2. 然后运行测试:

在此处输入图像描述

这就是我得到的:

在此处输入图像描述

我已经-Dappengine.sdk.root在 IntelliJ 的 Maven 运行器配置中添加了,但它似乎没有任何影响。

我也试过跑步$mvn test,它似乎工作正常:

Running org.jboss.arquillian.container.appengine.embedded.AppEngineEmbeddedClientTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.384 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

但是在内部,当我使用 -e 开关检查时,我可以看到这个错误:

Jan 05, 2015 4:22:22 AM com.google.appengine.tools.development.agent.AppEngineDevAgent premain
SEVERE: Unable to load the App Engine dev agent. Security restrictions will not be completely emulated.
java.lang.RuntimeException: Unexpected exception during cast.
        at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:385)
        at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:252)
        at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:263)
        at com.google.appengine.tools.development.agent.AppEngineDevAgent.premain(AppEngineDevAgent.java:61)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.IllegalAccessException: Class com.google.apphosting.utils.clearcast.ClearCast$CasterImpl can not access a member of class com.google.appengine.tools.development.agent.$Proxy0 with modifiers "public"
        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:101)
        at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:295)
        at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:287)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:398)
        at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:383)
        ... 9 more
Running org.jboss.arquillian.container.appengine.embedded.AppEngineEmbeddedClientTestCase
Jan 05, 2015 4:22:23 AM org.jboss.arquillian.container.appengine.embedded.AppEngineSetup prepare
INFO: simple.war:
4

1 回答 1

0

你是如何运行这些测试的?

我看到了 Jetty Embedded Arquillian Container?那是行不通的。

我建议使用 GAE Arquillian Container for SDK。

或者更多 hacky GAE Arquillian Container Embedded。

我们在 GAE TCK 中使用 GAE ARQ SDK Container:

于 2015-01-05T10:21:49.400 回答