Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Andrei-Pozolotin/0eeeca4653b03d5f067504ed100154d2 to your computer and use it in GitHub Desktop.
Save Andrei-Pozolotin/0eeeca4653b03d5f067504ed100154d2 to your computer and use it in GitHub Desktop.
"expected" annotation does not work with new TestAdapter.scala in 0.6.22
// This is test with "expected"
class CommonJSTest02 {
@Test( expected = classOf[ IllegalStateException ] )
def verifyException() : Unit = {
throw new IllegalStateException( "hello-scalor" )
}
}
// This is TestAdapter.scala log
java.lang.Exception
at com.carrotgarden.sjs.junit.Notificator.fireFailure(Notificator.scala:44)
at com.carrotgarden.sjs.junit.Notificator.handle(Notificator.scala:70)
at org.scalajs.testadapter.TaskAdapter.$anonfun$execute$1(TaskAdapter.scala:31)
at org.scalajs.testadapter.TaskAdapter.$anonfun$execute$1$adapted(TaskAdapter.scala:31)
at org.scalajs.testcommon.RunMuxRPC.$anonfun$attachMux$3(RunMuxRPC.scala:61)
at scala.Option.fold(Option.scala:158)
at org.scalajs.testcommon.RunMuxRPC.$anonfun$attachMux$1(RunMuxRPC.scala:60)
at org.scalajs.testcommon.RPCCore.$anonfun$handleMessage$1(RPCCore.scala:85)
at org.scalajs.testcommon.RPCCore.$anonfun$handleMessage$1$adapted(RPCCore.scala:47)
at org.scalajs.testcommon.Serializer$.withInputStream(Serializer.scala:48)
at org.scalajs.testcommon.RPCCore.handleMessage(RPCCore.scala:47)
at org.scalajs.testadapter.ComJSEnvRPC$$anon$1.run(ComJSEnvRPC.scala:31)
// This is Test Bridge invoker log
01:30:20.565 [main] INFO [JS-VM/manager] -
JS-VM launch: BRIDGE @ Thread[main,5,main]
exec: /home/work/source/git/scalor-maven-plugin/demo/test-tool/node/node
args:
vars: NODE_MODULE_CONTEXTS=0; NODE_PATH=/home/work/source/git/scalor-maven-plugin/demo/test-tool/node/node_modules
libs: /home/work/source/git/scalor-maven-plugin/demo/test-tool/webjars/jquery/jquery.js; /home/work/source/git/scalor-maven-plugin/demo/test-tool/webjars/vue/vue.js; /home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js
code: startTestBridge.js
01:30:25.801 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - Test demo.CommonJSTest02.verifyException failed: java.lang.IllegalStateException: hello-scalor, took 0.002101631 sec
01:30:25.802 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at scala.scalajs.runtime.StackTrace$.captureState(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:13657)
01:30:25.803 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at <jscode>.$c_jl_IllegalStateException.$c_jl_Throwable.fillInStackTrace__jl_Throwable(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:17668)
01:30:25.804 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at <jscode>.$c_jl_IllegalStateException.$c_jl_Throwable.init___T__jl_Throwable(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:17765)
01:30:25.805 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at <jscode>.$c_jl_IllegalStateException.$c_jl_Exception.init___T__jl_Throwable(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:20691)
01:30:25.806 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at <jscode>.$c_jl_IllegalStateException.$c_jl_RuntimeException.init___T__jl_Throwable(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:24656)
01:30:25.806 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at java.lang.IllegalStateException.<init>(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:27170)
01:30:25.807 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at java.lang.IllegalStateException.<init>(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:27174)
01:30:25.808 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at demo.CommonJSTest02.verifyException(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:2507)
01:30:25.809 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at demo.CommonJSTest02$scalajs$junit$bootstrapper$.invoke(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:14935)
01:30:25.810 [ComJSEnvRPC receiver] ERROR [JS-VM/invoker] - at org.scalajs.junit.JUnitExecuteTest.executeTestMethods$1(/home/work/source/git/scalor-maven-plugin/demo/target/test-classes/META-INF/resources/script-test/runtime-test.js:4802)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment