Hi Oleg, I'm sorry nobody has responded to this. I guess it means that nobody has a clue.
Here are some thoughts... Resharper tells us that the test can be made to work. We can't learn much more because their code is proprietary. Actually, NUnit itself is being consistent - unfortunately it's consistently hanging. How is NUnit running in your environment. Do you see NUnit creating a separate process (nunit-agent) to run the tests under .NET 4.0? If so, it may be worthwhile to experiment with running NUnit directly under .NET 4.0 so as to eliminate one level of inter-process communication. You can do that by modifying the config file for nunit or nunit-console. My hypothesis is that the scheduler may be making it appear as if NUnit's test process has disappeared. If that doesn't help, or if you are already running all in one process, then I'll take a look more closely. Unfortunately, the Hpc scheduler isn't something I've used. Charlie On Mon, Mar 25, 2013 at 8:39 AM, Oleg Gerovich <1095...@bugs.launchpad.net>wrote: > Hello, > Any suggestions on this? > > -- > You received this bug notification because you are subscribed to NUnit > Extended Testing Platform. > https://bugs.launchpad.net/bugs/1095833 > > Title: > Microsoft.Hpc.Scheduler test gets an exception > > To manage notifications about this bug go to: > https://bugs.launchpad.net/nunitv2/+bug/1095833/+subscriptions > -- You received this bug notification because you are a member of NUnit Developers, which is subscribed to NUnit V2. https://bugs.launchpad.net/bugs/1095833 Title: Microsoft.Hpc.Scheduler test gets an exception Status in NUnit V2 Test Framework: New Bug description: I have the following test: using Microsoft.Hpc.Scheduler; using NUnit.Framework; namespace TestHPC { [TestFixture] internal class TestHpc { [TestCase("HEAD-NODE-SERVER", 9)] public static void AllCoresPresent(string headNode, int expectedCores) { int totalCores = 0; using (IScheduler scheduler = new Scheduler()) { scheduler.Connect(headNode); ISchedulerCollection nodes = scheduler.GetNodeList(null, null); foreach (ISchedulerNode node in nodes) { totalCores += node.NumberOfCores; } } Assert.AreEqual(expectedCores, totalCores); } } } I am using a Visual Studio 2010 solution that has the project with this test build against .NET 4.0. This is the only test in the solution. If I use NUnit 2.6.0 GUI or console runner, the test hangs in the middle. If I use ReSharper 7.1.1 Unit Test runner pointed at my local NUnit 2.6.0 and run the test from the project compiled against 2.6.0 nunit.framework.dll, the test passes quite quickly. If I switch ReSharper to run tests with build-in NUnit 2.6.2 and compile against 2.6.2, the test fails with this error: Microsoft.Hpc.Scheduler.Properties.SchedulerException : No connection could be made because the target machine actively refused it 127.0.0.1:6729 ----> System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it Server stack trace: at Microsoft.Hpc.Scheduler.NodeManagement.NodeQuery.Reconnect() at Microsoft.Hpc.Scheduler.NodeManagement.NodeQuery.HandleException(Exception e) at Microsoft.Hpc.Scheduler.NodeManagement.NodeQuery.EnumerateGroupsForNode(String nodeName) at Microsoft.Hpc.Scheduler.Store.NodePropertyHandler.Tags.GetPropFromQuery(QueryContextBase ctx, PropertyId pid, ref StoreProperty prop) at Microsoft.Hpc.Scheduler.Store.QueryContextBase.GetPropFromQuery(PropertyId pid) at Microsoft.Hpc.Scheduler.Store.QueryContextBase.ExecuteRowSetQuery(List`1 ids, PropertyId[] pids) at Microsoft.Hpc.Scheduler.Store.SnapShotRowSet.GetData(Int32 firstRow, Int32 lastRow, ref Int32 rowCount) at Microsoft.Hpc.Scheduler.Store.SchedulerStoreInternal.RowSet_GetData(ref ConnectionToken token, Int32 rowsetId, Int32 firstRow, Int32 lastRow) at Microsoft.Hpc.Scheduler.Store.SchedulerStoreInternal.RowEnum_GetRows(ref ConnectionToken token, Int32 id, Int32 numberOfRows) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) Exception rethrown at [0]: at Microsoft.Hpc.Scheduler.Store.StoreServer.HandleException(Exception e, Boolean asyncReconnect) at Microsoft.Hpc.Scheduler.Store.StoreServer.RowEnum_GetRows(Int32 id, Int32 numberOfRows) at Microsoft.Hpc.Scheduler.Store.LocalRowEnumerator.GetRows2(Int32 numberOfRows) at Microsoft.Hpc.Scheduler.Store.RowEnumeratorEnumerator.MoveNext() at Microsoft.Hpc.Scheduler.Scheduler.GetNodeList(IFilterCollection filter, ISortCollection sort) at TestHPC.TestHpc.AllCoresPresent(String headNode, Int32 expectedCores) in TestHPC.cs: line 18 --SocketException Server stack trace: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint) at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket() at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew) at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream) at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ref ITransportHeaders responseHeaders, ref Stream responseStream) at Microsoft.Hpc.ClientSink.ProcessMessage(IMessage message, ITransportHeaders requestHeaders, Stream requestStream, ref ITransportHeaders responseHeaders, ref Stream responseStream) at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref MessageData msgData, Int32 type) at Microsoft.Hpc.Scheduler.NodeManagement.INodeQuery.EnumerateNodeGroups() at Microsoft.Hpc.Scheduler.NodeManagement.NodeQuery.Reconnect() If I use NUnit 2.6.2 GUI or console runner, the test hangs in the middle. There are no firewalls blocking port 6729 on the HPC server. All I did was switch the version of NUnit. There seems to be a difference in how ReSharper is launching NUnit from the way NUnit GUI and console runner work. If I did not have ReSharper, I would have no clue that my test could pass. ReSharper's behavior is observed in TeamCity when I run the test using NUnit runner. Looks like JetBrains have some consistency across their products that work better for execution of NUnit tests than native tools. I have a variety of other tests that work just fine after the switch, so the problem is constrained to Microsoft.Hpc.Scheduler tests (for now). I can provide more information if needed. Please help! To manage notifications about this bug go to: https://bugs.launchpad.net/nunitv2/+bug/1095833/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~nunit-core Post to : nunit-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nunit-core More help : https://help.launchpad.net/ListHelp