atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Yamijala (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ATLAS-297) KafkaNotificationTest.testSendReceiveMessage fails when atlas-server is running on the same machine
Date Fri, 13 Nov 2015 12:07:10 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hemanth Yamijala updated ATLAS-297:
-----------------------------------
    Attachment: ATLAS-297-1.patch

Here is a very dumbed down version that addresses the original issue of the JIRA, and doesn't
regress integration tests.

Considering that this JIRA is more related to developers than production runs, I am proposing
a hugely simplified fix. Today we have two sources of property files:  The typesystem module
has an application.properties and the distro module has another one. When the product is packaged
and installed, it uses the distro module's application.properties. When the product runs tests
- it uses the typesystem module's ones. The fix is simply to specify different port numbers
in the two properties so that they don't conflict - thereby eliminating the complexity of
ephemeral ports etc.

On a more general cleanup note: we should probably make the environment specific properties
more explicit. So, rather than have different property files, we could have a properties template
and have environment specific values and substitute them on need. I guess we could do this
using profile builds in maven. I am OK to do this as part of this patch, or have this committed
(as it does address the raised issue) and have a new JIRA to work on that clean up. Happy
to get advise on what others feel.

Please note this patch does not address the issue with integration tests running alongside
a local atlas server instance. Basically, mvn package will run fine alongside a local atlas
server instance with this fix.

Please let me know what you think.

> KafkaNotificationTest.testSendReceiveMessage fails when atlas-server is running on the
same machine 
> ----------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-297
>                 URL: https://issues.apache.org/jira/browse/ATLAS-297
>             Project: Atlas
>          Issue Type: Bug
>         Environment: Dev environment 
>            Reporter: Hemanth Yamijala
>            Assignee: Hemanth Yamijala
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: ATLAS-297-1.patch, ATLAS-297.patch
>
>
> Start the atlas-server on local machine. Then execute mvn -Dtest=KafkaNotificationTest
-DfailIfNoTests=false test
> Get the following stack trace and test failure:
> Running org.apache.atlas.kafka.KafkaNotificationTest
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 1.262 sec <<<
FAILURE! - in org.apache.atlas.kafka.KafkaNotificationTest
> setUp(org.apache.atlas.kafka.KafkaNotificationTest)  Time elapsed: 0.88 sec  <<<
FAILURE!
> org.apache.atlas.AtlasException: Failed to start embedded kafka
> 	at sun.nio.ch.Net.bind0(Native Method)
> 	at sun.nio.ch.Net.bind(Net.java:463)
> 	at sun.nio.ch.Net.bind(Net.java:455)
> 	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
> 	at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:95)
> 	at org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:126)
> 	at org.apache.atlas.kafka.KafkaNotification.startZk(KafkaNotification.java:140)
> 	at org.apache.atlas.kafka.KafkaNotification.start(KafkaNotification.java:170)
> 	at org.apache.atlas.kafka.KafkaNotificationTest.setUp(KafkaNotificationTest.java:40)



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

Mime
View raw message