You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org> on 2014/11/26 05:13:41 UTC

[jira] [Commented] (LENS-51) TestStaticFileResource test should use available port instead of using static/fixed port number

    [ https://issues.apache.org/jira/browse/LENS-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225698#comment-14225698 ] 

Amareshwari Sriramadasu commented on LENS-51:
---------------------------------------------

+1 for the patch.

Can you update test result here?

> TestStaticFileResource test should use available port instead of using static/fixed port number
> -----------------------------------------------------------------------------------------------
>
>                 Key: LENS-51
>                 URL: https://issues.apache.org/jira/browse/LENS-51
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: server
>            Reporter: Raju Bairishetti
>            Assignee: Raju Bairishetti
>            Priority: Minor
>              Labels: test
>             Fix For: 2.0
>
>         Attachments: LENS-51.patch
>
>
> Right now, TestStaticFileResource is using 19999 port for testing the ui. But Lens UI server also uses 19999 as default port number. Whenever we run both unit test and lens ui server on default port test is failing.
> *TestFailure and stack trace:*
> {noformat}
> setUp(org.apache.lens.server.TestStaticFileResource)  Time elapsed: 25.486 sec  <<< FAILURE!
> org.glassfish.jersey.test.spi.TestContainerException: javax.ws.rs.ProcessingException: IOException thrown when trying to start grizzly server
> 	at sun.nio.ch.Net.bind(Native Method)
> 	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
> 	at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:132)
> 	at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
> 	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:233)
> 	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:213)
> 	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:204)
> 	at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:681)
> 	at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:276)
> 	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:274)
> 	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:138)
> 	at org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory$GrizzlyTestContainer.start(GrizzlyTestContainerFactory.java:88)
> 	at org.glassfish.jersey.test.JerseyTest.setUp(JerseyTest.java:487)
> 	at org.apache.lens.server.TestStaticFileResource.setUp(TestStaticFileResource.java:50)
> Caused by: javax.ws.rs.ProcessingException: IOException thrown when trying to start grizzly server
>         at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:276)
>         at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:138)
>         at org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory$GrizzlyTestContainer.start(GrizzlyTestContainerFactory.java:88)
>         ... 28 more
> Caused by: java.net.BindException: Address already in use
>         at sun.nio.ch.Net.bind(Native Method)
>         at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124)
>         at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>         at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:132)
>         at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
>         at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:233)
>         at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:213)
>         at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:204)
>         at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:681)
>         at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:276)
>         at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:274)
>         ... 30 more
> {noformat}
> *Fix:* It should find the available port dynamically.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)