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/
