You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by manua <ag...@gmail.com> on 2009/03/20 14:50:20 UTC

Unable to run Unit test for ActiveMQ NMS

Hi,

I am trying to use NMS on windows. I tried to run the Unit tests through
NUnit, but unable to do so. Out of the total 85 test cases, 61 have
failed.tests pertaining to Apache.NMS.ActiveMQ.Test.dll have passed, but all
the tests for Apache.NMS.Test.dll have failed. The error, I got is,

Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(False):
System.Net.Sockets.SocketException : No such host is known

at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean
includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.Connect(String
host, Int32 port) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
159
at
Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CompositeConnect(Uri
location) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
113
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CreateTransport(Uri
location) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
144
at Apache.NMS.ActiveMQ.Transport.TransportFactory.CreateTransport(Uri
location) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\TransportFactory.cs:line
82
at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection(String userName,
String password) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\ConnectionFactory.cs:line
100
at Apache.NMS.Test.NMSTestSupport.CreateConnection(String newClientId)
at Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(Boolean
persistent)

I got the same error for the all the failed test cases. My ActiveMQ broker
is runing at localhost:61616.

Please let me know, what may be wrong from my side. Its my first experiance
with NMS. Any help in this regard will be highly appreciated.

Thanks,
Manu
-- 
View this message in context: http://www.nabble.com/Unable-to-run-Unit-test-for-ActiveMQ-NMS-tp22620694p22620694.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Unable to run Unit test for ActiveMQ NMS

Posted by Timothy Bish <ta...@gmail.com>.
On Fri, 2009-03-20 at 10:56 -0700, manua wrote:
> Hi, 
> 
> I am able to run the Unit tests, when I run it on my local machine.But, when
> I install it on a remote machine and tried to run it there (connected
> through remote desktop), as local to that machine, it fails for 2 test cases
> (test case 43,44) and gave the following error, 
> 
> Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(False):
> Apache.NMS.ActiveMQ.BrokerException : javax.jms.InvalidDestinationException
> : No durable subscription exists for: ConsumerTestConsumerId
> 
> Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(True):
> Apache.NMS.ActiveMQ.BrokerException :
> org.apache.activemq.kaha.RuntimeStoreException : java.io.IOException: Could
> not locate data file data-topic-acks--1
> 
> 
> at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request(Command command,
> TimeSpan timeout) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\ResponseCorrelator.cs:line
> 105
> at Apache.NMS.ActiveMQ.Connection.SyncRequest(Command command, TimeSpan
> requestTimeout) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Connection.cs:line
> 333
> at Apache.NMS.ActiveMQ.Session.DoSend(Command message, TimeSpan
> requestTimeout) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
> 478
> at Apache.NMS.ActiveMQ.Session.DoSend(Command message) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
> 467
> at Apache.NMS.ActiveMQ.Session.DeleteDurableConsumer(String name) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
> 302
> at Apache.NMS.Test.NMSTestSupport.UnregisterDurableConsumer(String
> connectionID, String consumerID)
> at Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(Boolean
> persistent)
> 
> Kindly help me with this. Thanks in advance
> 
> Thanks,
> Manu

This is a known issue, see:
http://issues.apache.org/activemq/browse/AMQNET-150

Regards
Tim.


-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Re: Unable to run Unit test for ActiveMQ NMS

Posted by manua <ag...@gmail.com>.
Hi, 

I am able to run the Unit tests, when I run it on my local machine.But, when
I install it on a remote machine and tried to run it there (connected
through remote desktop), as local to that machine, it fails for 2 test cases
(test case 43,44) and gave the following error, 

Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(False):
Apache.NMS.ActiveMQ.BrokerException : javax.jms.InvalidDestinationException
: No durable subscription exists for: ConsumerTestConsumerId

Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(True):
Apache.NMS.ActiveMQ.BrokerException :
org.apache.activemq.kaha.RuntimeStoreException : java.io.IOException: Could
not locate data file data-topic-acks--1


at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request(Command command,
TimeSpan timeout) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\ResponseCorrelator.cs:line
105
at Apache.NMS.ActiveMQ.Connection.SyncRequest(Command command, TimeSpan
requestTimeout) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Connection.cs:line
333
at Apache.NMS.ActiveMQ.Session.DoSend(Command message, TimeSpan
requestTimeout) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
478
at Apache.NMS.ActiveMQ.Session.DoSend(Command message) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
467
at Apache.NMS.ActiveMQ.Session.DeleteDurableConsumer(String name) in
c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Session.cs:line
302
at Apache.NMS.Test.NMSTestSupport.UnregisterDurableConsumer(String
connectionID, String consumerID)
at Apache.NMS.Test.ConsumerTest.TestDurableConsumerSelectorChange(Boolean
persistent)

Kindly help me with this. Thanks in advance

Thanks,
Manu


manua wrote:
> 
> 
> Hi Tim,
> 
> Thanks for your suggestion. I am able to run the Unit test.
> 
> Thanks,
> Manu
> 
> 
> Timothy Bish wrote:
>> 
>> On Fri, 2009-03-20 at 06:50 -0700, manua wrote:
>>> Hi,
>>> 
>>> I am trying to use NMS on windows. I tried to run the Unit tests through
>>> NUnit, but unable to do so. Out of the total 85 test cases, 61 have
>>> failed.tests pertaining to Apache.NMS.ActiveMQ.Test.dll have passed, but
>>> all
>>> the tests for Apache.NMS.Test.dll have failed. The error, I got is,
>>> 
>>> Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(False):
>>> System.Net.Sockets.SocketException : No such host is known
>>> 
>>> at System.Net.Dns.GetAddrInfo(String name)
>>> at System.Net.Dns.InternalGetHostByName(String hostName, Boolean
>>> includeIPv6)
>>> at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
>>> at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.Connect(String
>>> host, Int32 port) in
>>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>>> 159
>>> at
>>> Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CompositeConnect(Uri
>>> location) in
>>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>>> 113
>>> at
>>> Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CreateTransport(Uri
>>> location) in
>>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>>> 144
>>> at Apache.NMS.ActiveMQ.Transport.TransportFactory.CreateTransport(Uri
>>> location) in
>>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\TransportFactory.cs:line
>>> 82
>>> at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection(String
>>> userName,
>>> String password) in
>>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\ConnectionFactory.cs:line
>>> 100
>>> at Apache.NMS.Test.NMSTestSupport.CreateConnection(String newClientId)
>>> at Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(Boolean
>>> persistent)
>>> 
>>> I got the same error for the all the failed test cases. My ActiveMQ
>>> broker
>>> is runing at localhost:61616.
>>> 
>>> Please let me know, what may be wrong from my side. Its my first
>>> experiance
>>> with NMS. Any help in this regard will be highly appreciated.
>> 
>> In order to run the NMS unit tests you need to be running a broker.
>> Following that you need to edit the config file in
>> nmsprovider-test.config to reflect the address where your broker can be
>> found, by default its set to activemqhost.  You could also alias
>> activemqhost in your hosts file.
>> 
>> Regards
>> Tim
>> 
>> -- 
>> Tim Bish
>> http://fusesource.com
>> http://timbish.blogspot.com/
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Unable-to-run-Unit-test-for-ActiveMQ-NMS-tp22620694p22625642.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Unable to run Unit test for ActiveMQ NMS

Posted by manua <ag...@gmail.com>.

Hi Tim,

Thanks for your suggestion. I am able to run the Unit test.

Thanks,
Manu


Timothy Bish wrote:
> 
> On Fri, 2009-03-20 at 06:50 -0700, manua wrote:
>> Hi,
>> 
>> I am trying to use NMS on windows. I tried to run the Unit tests through
>> NUnit, but unable to do so. Out of the total 85 test cases, 61 have
>> failed.tests pertaining to Apache.NMS.ActiveMQ.Test.dll have passed, but
>> all
>> the tests for Apache.NMS.Test.dll have failed. The error, I got is,
>> 
>> Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(False):
>> System.Net.Sockets.SocketException : No such host is known
>> 
>> at System.Net.Dns.GetAddrInfo(String name)
>> at System.Net.Dns.InternalGetHostByName(String hostName, Boolean
>> includeIPv6)
>> at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
>> at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.Connect(String
>> host, Int32 port) in
>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>> 159
>> at
>> Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CompositeConnect(Uri
>> location) in
>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>> 113
>> at
>> Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CreateTransport(Uri
>> location) in
>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
>> 144
>> at Apache.NMS.ActiveMQ.Transport.TransportFactory.CreateTransport(Uri
>> location) in
>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\TransportFactory.cs:line
>> 82
>> at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection(String
>> userName,
>> String password) in
>> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\ConnectionFactory.cs:line
>> 100
>> at Apache.NMS.Test.NMSTestSupport.CreateConnection(String newClientId)
>> at Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(Boolean
>> persistent)
>> 
>> I got the same error for the all the failed test cases. My ActiveMQ
>> broker
>> is runing at localhost:61616.
>> 
>> Please let me know, what may be wrong from my side. Its my first
>> experiance
>> with NMS. Any help in this regard will be highly appreciated.
> 
> In order to run the NMS unit tests you need to be running a broker.
> Following that you need to edit the config file in
> nmsprovider-test.config to reflect the address where your broker can be
> found, by default its set to activemqhost.  You could also alias
> activemqhost in your hosts file.
> 
> Regards
> Tim
> 
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Unable-to-run-Unit-test-for-ActiveMQ-NMS-tp22620694p22621813.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Unable to run Unit test for ActiveMQ NMS

Posted by Timothy Bish <ta...@gmail.com>.
On Fri, 2009-03-20 at 06:50 -0700, manua wrote:
> Hi,
> 
> I am trying to use NMS on windows. I tried to run the Unit tests through
> NUnit, but unable to do so. Out of the total 85 test cases, 61 have
> failed.tests pertaining to Apache.NMS.ActiveMQ.Test.dll have passed, but all
> the tests for Apache.NMS.Test.dll have failed. The error, I got is,
> 
> Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(False):
> System.Net.Sockets.SocketException : No such host is known
> 
> at System.Net.Dns.GetAddrInfo(String name)
> at System.Net.Dns.InternalGetHostByName(String hostName, Boolean
> includeIPv6)
> at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
> at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.Connect(String
> host, Int32 port) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
> 159
> at
> Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CompositeConnect(Uri
> location) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
> 113
> at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CreateTransport(Uri
> location) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\Tcp\TcpTransportFactory.cs:line
> 144
> at Apache.NMS.ActiveMQ.Transport.TransportFactory.CreateTransport(Uri
> location) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\Transport\TransportFactory.cs:line
> 82
> at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection(String userName,
> String password) in
> c:\amq\activemq-dotnet\Apache.NMS.ActiveMQ\trunk\src\main\csharp\ConnectionFactory.cs:line
> 100
> at Apache.NMS.Test.NMSTestSupport.CreateConnection(String newClientId)
> at Apache.NMS.Test.AsyncConsumeTest.TestAsynchronousConsume(Boolean
> persistent)
> 
> I got the same error for the all the failed test cases. My ActiveMQ broker
> is runing at localhost:61616.
> 
> Please let me know, what may be wrong from my side. Its my first experiance
> with NMS. Any help in this regard will be highly appreciated.

In order to run the NMS unit tests you need to be running a broker.
Following that you need to edit the config file in
nmsprovider-test.config to reflect the address where your broker can be
found, by default its set to activemqhost.  You could also alias
activemqhost in your hosts file.

Regards
Tim

-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/