Coder Social home page Coder Social logo

robovm-junit's Introduction

RoboVM

Please see robovm.com for more information.

robovm-junit's People

Contributors

ashleyj avatar badlogic avatar ntherning avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robovm-junit's Issues

Exception serialization fails for AssumptionViolatedException instances

This test class has test methods that are ignored on certain platforms, e.g.:

    @Test
    public void testIfCustomObjectsAreRetained() {
        Assume.assumeTrue(System.getProperty("os.name").contains("iOS"));
        ....

When run on OS X this throws an AssumptionViolatedException which includes a org.hamcrest.core.Is as a field. This class is not serializable and results in a NotSerializableException being thrown instead. It would be best if we don't have to serialize exception instance at all but instead send over the stacktrace. Maybe it will work if we extend from Failure and let getException() always return null and getTrace() will return the stacktrace as a string.

Running org.robovm.objc.ObjCObjectOwnershipHelperTest
[DEBUG] Running test org.robovm.objc.ObjCObjectOwnershipHelperTest
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.054 sec <<< FAILURE! - in org.robovm.objc.ObjCObjectOwnershipHelperTest
org.robovm.objc.ObjCObjectOwnershipHelperTest  Time elapsed: 0.051 sec  <<< ERROR!
java.lang.Error: java.io.NotSerializableException: org.hamcrest.core.Is
    at org.robovm.junit.protocol.ThrowableTypeAdapter.serialize(ThrowableTypeAdapter.java:54)
    at org.robovm.junit.protocol.ThrowableTypeAdapter.serialize(ThrowableTypeAdapter.java:39)
    at org.robovm.junit.deps.com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70)
    at org.robovm.junit.deps.com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
    at org.robovm.junit.deps.com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:593)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:572)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:527)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:507)
    at org.robovm.junit.protocol.ResultObject.toJson(ResultObject.java:77)
    at org.robovm.junit.server.RoboTestListener.transmit(RoboTestListener.java:106)
    at org.robovm.junit.server.RoboTestListener.sendToHost(RoboTestListener.java:97)
    at org.robovm.junit.server.RoboTestListener.testAssumptionFailure(RoboTestListener.java:41)
    at org.junit.runner.notification.RunNotifier$5.notifyListener(RunNotifier.java)
    at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java)
    at org.junit.runner.notification.RunNotifier.fireTestAssumptionFailed(RunNotifier.java)
    at org.junit.internal.runners.model.EachTestNotifier.addFailedAssumption(EachTestNotifier.java)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java)
    at org.junit.runners.ParentRunner.run(ParentRunner.java)
    at org.junit.runners.Suite.runChild(Suite.java)
    at org.junit.runners.Suite.runChild(Suite.java)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java)
    at org.junit.runners.ParentRunner.run(ParentRunner.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.robovm.junit.server.TestServer.runClass(TestServer.java:212)
    at org.robovm.junit.server.TestServer.processCommand(TestServer.java:168)
    at org.robovm.junit.server.TestServer$2.call(TestServer.java:97)
    at org.robovm.junit.server.TestServer$2.call(TestServer.java:93)
    at org.robovm.junit.deps.rx.Observable$34.onNext(Observable.java:7430)
    at org.robovm.junit.deps.rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
    at org.robovm.junit.deps.rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
    at org.robovm.junit.server.TestServer$6.call(TestServer.java:131)
    at org.robovm.junit.server.TestServer$6.call(TestServer.java:116)
    at org.robovm.junit.deps.rx.Observable$1.call(Observable.java:144)
    at org.robovm.junit.deps.rx.Observable$1.call(Observable.java:136)
    at org.robovm.junit.deps.rx.Observable.subscribe(Observable.java:7585)
    at org.robovm.junit.deps.rx.Observable.subscribe(Observable.java:7416)
    at org.robovm.junit.server.TestServer.run(TestServer.java:93)
    at org.robovm.junit.server.TestServer.main(TestServer.java:76)
Caused by: java.io.NotSerializableException: org.hamcrest.core.Is
    at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java)
    at org.robovm.junit.protocol.ThrowableTypeAdapter.serialize(ThrowableTypeAdapter.java:50)
    at org.robovm.junit.protocol.ThrowableTypeAdapter.serialize(ThrowableTypeAdapter.java:39)
    at org.robovm.junit.deps.com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70)
    at org.robovm.junit.deps.com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
    at org.robovm.junit.deps.com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
    at org.robovm.junit.deps.com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:593)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:572)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:527)
    at org.robovm.junit.deps.com.google.gson.Gson.toJson(Gson.java:507)
    at org.robovm.junit.protocol.ResultObject.toJson(ResultObject.java:77)
    at org.robovm.junit.server.RoboTestListener.transmit(RoboTestListener.java:106)
    at org.robovm.junit.server.RoboTestListener.sendToHost(RoboTestListener.java:97)
    at org.robovm.junit.server.RoboTestListener.testAssumptionFailure(RoboTestListener.java:41)
    at org.junit.runner.notification.RunNotifier$5.notifyListener(RunNotifier.java)
    at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java)
    at org.junit.runner.notification.RunNotifier.fireTestAssumptionFailed(RunNotifier.java)
    at org.junit.internal.runners.model.EachTestNotifier.addFailedAssumption(EachTestNotifier.java)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java)
    at org.junit.runners.ParentRunner.run(ParentRunner.java)
    at org.junit.runners.Suite.runChild(Suite.java)
    at org.junit.runners.Suite.runChild(Suite.java)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java)
    at org.junit.runners.ParentRunner.run(ParentRunner.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.junit.runner.JUnitCore.run(JUnitCore.java)
    at org.robovm.junit.server.TestServer.runClass(TestServer.java:212)
    at org.robovm.junit.server.TestServer.processCommand(TestServer.java:168)
    at org.robovm.junit.server.TestServer$2.call(TestServer.java:97)
    at org.robovm.junit.server.TestServer$2.call(TestServer.java:93)
    at org.robovm.junit.deps.rx.Observable$34.onNext(Observable.java:7430)
    at org.robovm.junit.deps.rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
    at org.robovm.junit.deps.rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
    at org.robovm.junit.server.TestServer$6.call(TestServer.java:131)
    at org.robovm.junit.server.TestServer$6.call(TestServer.java:116)
    at org.robovm.junit.deps.rx.Observable$1.call(Observable.java:144)
    at org.robovm.junit.deps.rx.Observable$1.call(Observable.java:136)
    at org.robovm.junit.deps.rx.Observable.subscribe(Observable.java:7585)
    at org.robovm.junit.deps.rx.Observable.subscribe(Observable.java:7416)
    at org.robovm.junit.server.TestServer.run(TestServer.java:93)
    at org.robovm.junit.server.TestServer.main(TestServer.java:76)

Some exceptions fail to deserialize

E.g. java.lang.ReflectiveOperationException. The problem occurs since Oracle's RT uses a different serialVersionUID than Android:

Caused by: java.io.InvalidClassException: java.lang.ReflectiveOperationException; local class incompatible: stream classdesc serialVersionUID = 2505831918131413020, local class serialVersionUID = 123456789

We need to come up with serialization which doesn't rely on Java's builtin serialization.

robovm-maven-plugin code merge

This plugin and the robovm-maven-plugin have many things in common. There should be possibilities for sharing things between them. E.g. the way the robovm "home" is handled in robovm-maven-plugin. It downloads and extracts the robovm-dist artifact so no previous installation is required. Also, both plugins obviously compile bytecode to machine code using RoboVM.

Suggestion: Break out the common stuff into a separate module that can be reused by both plugins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.