reTHINK-project / dev-msg-node-vertx

Apache License 2.0
0 stars 2 forks source link

Can't run tests #11

Closed fbeierle closed 8 years ago

fbeierle commented 8 years ago

I installed everything like described in the readme: https://github.com/reTHINK-project/dev-msg-node-vertx

Even though I enter ports 9090 and 9091 when starting the MsgNodes, the ports that show up in the logging on the console are 5701 and 5702, seemingly from a parameter in the cluster.xml file. When running the tests with "karma start," all tests fail, either with a timeout or with:

Uncaught Error: expected { type: 'update',
  from: 'hyperty-runtime://sp1/protostub/123',
  to: 'hyperty-runtime://sp1/protostub/123/status',
  body:
   { value: 'disconnected',
     desc: 'The connection was closed abnormally, e.g., without sending or receiving a Close control frame' } } to sort of equal { type: 'update',
  from: 'hyperty-runtime://sp1/protostub/123',
  to: 'hyperty-runtime://sp1/protostub/123/status',
  body: { value: 'connected' } } ([...]1cc954f1.browserify:1790 <- node_modules/expect.js/index.js:102:0)

Is there something else I need to configure in order to be able to run the tests? Does it have to do with the URLs set in the tests?

shumy commented 8 years ago

Ports 5**\ are for Hazelcast cluster. Conectivity problems could be related to host configuration file or certificates. I will update the docs to reflect these instructions.

fbeierle commented 8 years ago

Thanks for the help. I used this http://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate to permanently store the certificate in Chrome.

Still, the tests are failing. The MsgNode running on 9090 gives this:

Feb 03, 2016 10:10:23 AM io.vertx.core.impl.ContextImpl
SCHWERWIEGEND: Unhandled exception
java.lang.Error: Unresolved compilation problem:
    The type java.time.Instant cannot be resolved. It is indirectly referenced from required .class files

    at eu.rethink.mn.pipeline.message.PipeMessage.<init>(PipeMessage.java:26)
    at eu.rethink.mn.WebSocketServer.lambda$3(WebSocketServer.java:27)
    at io.vertx.core.http.impl.WebSocketImplBase.handleFrame(WebSocketImplBase.java:170)
    at io.vertx.core.http.impl.ServerConnection.handleWsFrame(ServerConnection.java:327)
    at io.vertx.core.http.impl.ServerConnection.processMessage(ServerConnection.java:412)
    at io.vertx.core.http.impl.ServerConnection.handleMessage(ServerConnection.java:134)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.doMessageReceived(HttpServerImpl.java:492)
    at io.vertx.core.http.impl.HttpServerImpl$ServerHandler.doMessageReceived(HttpServerImpl.java:430)
    at io.vertx.core.http.impl.VertxHttpHandler.lambda$channelRead$18(VertxHttpHandler.java:80)
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:333)
    at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:225)
    at io.vertx.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:80)
    at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:124)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1107)
    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:960)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:327)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:230)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)

Opening the project in Eclipse gives me

The type java.time.Instant cannot be resolved. It is indirectly referenced from required .class files

at this line: https://github.com/reTHINK-project/dev-msg-node-vertx/blob/dev-0.3/src/main/java/eu/rethink/mn/pipeline/message/PipeMessage.java#L26 and suggests there might be something missing in the build path.

shumy commented 8 years ago

I think java.time.Instant is part of java 8 and only.

fbeierle commented 8 years ago

Updating Java from 1.8.0_66 to 1.8.0_72 did the trick.

However, the two tests for the RegistryConnector are still failing for me, with:

Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.

Are the two RegistryConnector tests running successfully for you?

shumy commented 8 years ago

These ones only work if vertx can connect to the domain registry.