Microsoft.Hpc.Scheduler test gets an exception

Bug #1095833 reported by Oleg Gerovich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
New
Undecided
Unassigned

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 built-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!

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

Hello,
Any suggestions on this?

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 1095833] Re: Microsoft.Hpc.Scheduler test gets an exception

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
<email address hidden>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
>

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

Hi Charlie,

Thanks for the pointers!

I am targeting .NET 4.0 in my C# project. I do see nunit-agent appearing during execution. I tried playing with RequireSTA, but to no avail.

I looked at nunit.exe.config and nunit-console.exe.config for 2.6.2. This is what it looks like with my modifications based on what I found on the web:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <!--
   The .NET 2.0 build of the console runner only
   runs under .NET 2.0 or higher. The setting
   useLegacyV2RuntimeActivationPolicy only applies
   under .NET 4.0 and permits use of mixed mode
   assemblies, which would otherwise not load
   correctly.
  -->
 <startup useLegacyV2RuntimeActivationPolicy="true">
    <requiredRuntime version="v4.0" />
    <supportedRuntime version="v4.0"/>
  </startup>
 <runtime>
  <!-- Ensure that test exceptions don't crash NUnit -->
  <legacyUnhandledExceptionPolicy enabled="1"/>
  <!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
  <loadFromRemoteSources enabled="true"/>
  <!-- Look for addins in the addins directory for now -->
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   <probing privatePath="lib;addins"/>
  </assemblyBinding>
 </runtime>
</configuration>

With this config, I no longer see nunit-agent being started. I get the same error as with ReSharper:
No connection could be made because the target machine actively refused it 127.0.0.1:6729

I tried adding similar startup entries to app.config of my test project with the same result.

I'm going to experiment with .NET 4.5 tomorrow. Please let me know if you have other suggestions. Maybe my config file is wrong.

Regards,
Oleg.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Your config is OK and is having the desired affect. So the hang in both versions of the NUnit Gui only occurs when nunit is running nunit-agent. That error would need to be dealt with, but it's apparently a separate one.

Have you tried running NUnit 2.6.0 with the same config change? My guess is that it will run OK.

What do I need to install in order to run your test case?

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :
Download full text (3.7 KiB)

Same hang in 2.6.0 NUnit GUI with or without the change. I can try console later today if you need me to.

To be more precise, the "hang" actually takes 10 minutes or so, after which it comes back with this exception:

System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Server stack trace:

Server stack trace:
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffer, Int32 offset, Int32 count)
at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[] buffer)
at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16& operation)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, 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(MessageData& msgData, Int32 type)
at Microsoft.Hpc.Scheduler.Store.ISchedulerStoreInternal.Register(String clientSource, String userName, ConnectionRole role, Version clientVersion, ConnectionToken& token, UserPrivilege& privilege, Version& serverVersion, Dictionary`2& serverProps)
at Microsoft.Hpc.Scheduler.Store.StoreServer.RegisterWithServer()
at Microsoft.Hpc.Scheduler.Store.StoreServer._Connect()
at Microsoft.Hpc.Scheduler.Store.StoreServer.Connect(String server, Int32 port, Boolean serviceAsClient, ServiceAsClientIdentityProvider identityProvider, String serviceAsClientUser, String serviceAsClientPass)
at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc..ctor(String server, Int32 port, Boolean serviceAsClient, ServiceAsClientIdentityProvider provider, String serviceAsClientUser, String serviceAsClientPass, Boolean overHttp)
at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc.RemoteConnect(String server, Int32 port, Boolean serviceAsClient, ServiceAsClientIdentityProvider provider, String userName, String password, Boolean overHttp)
at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc.RemoteConnect(String server, Int32 port)
at Microsoft.Hpc.Scheduler.Store.SchedulerStore.Connect(String server)
at Microsoft.Hpc.Scheduler.Scheduler.Connect(String cluster)
at TestHPC.TestHpc.AllCoresPresent(String headNode, Int32 expectedCores) in C:\Obfuscated\Path\TestHPC\TestHPC.cs:line 18

So it seems there are a couple of ways the test can fail.

You need to install the HPC cluster OS on a separate machine:
http://www.microsoft.com/en-us/download/details.aspx?id=13769

Apply this service pack:
http://www.microsoft.com/en-us/do...

Read more...

Revision history for this message
Charlie Poole (charlie.poole) wrote :
Download full text (4.4 KiB)

Ouch! That's a bunch to install. Do any devs with an interest in HPC want
to volunteer to work this bug?

Charlie

On Tue, Mar 26, 2013 at 6:54 AM, Oleg Gerovich
<email address hidden>wrote:

> Same hang in 2.6.0 NUnit GUI with or without the change. I can try
> console later today if you need me to.
>
> To be more precise, the "hang" actually takes 10 minutes or so, after
> which it comes back with this exception:
>
> System.Net.Sockets.SocketException : A connection attempt failed because
> the connected party did not properly respond after a period of time, or
> established connection failed because connected host has failed to
> respond
>
> Server stack trace:
>
> Server stack trace:
> at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
> size, SocketFlags socketFlags)
> at System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, Int32
> offset, Int32 size)
> at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[]
> buffer, Int32 offset, Int32 count)
> at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer,
> Int32 offset, Int32 count)
> at
> System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[]
> buffer)
> at
> System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16&
> operation)
> at
> System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage
> msg, ITransportHeaders requestHeaders, Stream requestStream,
> ITransportHeaders& responseHeaders, 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(MessageData&
> msgData, Int32 type)
> at Microsoft.Hpc.Scheduler.Store.ISchedulerStoreInternal.Register(String
> clientSource, String userName, ConnectionRole role, Version clientVersion,
> ConnectionToken& token, UserPrivilege& privilege, Version& serverVersion,
> Dictionary`2& serverProps)
> at Microsoft.Hpc.Scheduler.Store.StoreServer.RegisterWithServer()
> at Microsoft.Hpc.Scheduler.Store.StoreServer._Connect()
> at Microsoft.Hpc.Scheduler.Store.StoreServer.Connect(String server, Int32
> port, Boolean serviceAsClient, ServiceAsClientIdentityProvider
> identityProvider, String serviceAsClientUser, String serviceAsClientPass)
> at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc..ctor(String server,
> Int32 port, Boolean serviceAsClient, ServiceAsClientIdentityProvider
> provider, String serviceAsClientUser, String serviceAsClientPass, Boolean
> overHttp)
> at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc.RemoteConnect(String
> server, Int32 port, Boolean serviceAsClient,
> ServiceAsClientIdentityProvider provider, String userName, String password,
> Boolean overHttp)
> at Microsoft.Hpc.Scheduler.Store.SchedulerStoreSvc.RemoteConnect(String
> server, Int32 port)
> at Microsoft.Hpc.Scheduler.Store.SchedulerStore.Connect(String server)
> at Microsoft.Hpc.Scheduler.Scheduler.Connect(String cluster)
> at TestHPC.TestHpc.AllCoresPresent(String hea...

Read more...

description: updated
affects: nunitv2 → nunit-3.0
Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

I got the test to work with NUnit 2.6.2 by having the following in nunit.exe.config:

<startup useLegacyV2RuntimeActivationPolicy="true">
    <!-- Comment out the next line to force use of .NET 4.0 -->
    <supportedRuntime version="v4.0.30319" />
</startup>

Right now the test only works on a machine that has .NET 4.0 installed. If .NET 4.5 is installed, the test hangs as before. How can I make it work on 4.5?

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

nunit-console.exe can be made to work with .NET 4.5 if nunit-console.exe.config is modified like this:

 <startup useLegacyV2RuntimeActivationPolicy="true">
  <!-- Comment out the next line to force use of .NET 4.0 -->
                <supportedRuntime version="v4.0"/>
 </startup>

or this:

 <startup useLegacyV2RuntimeActivationPolicy="true">
  <!-- Comment out the next line to force use of .NET 4.0 -->
                <supportedRuntime version="v4.0.30319"/>
 </startup>

The output of command line test execution in that case is this:

NUnit-Console version 2.6.2.12296
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
   OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
  CLR Version: 4.0.30319.18063 ( Net 4.5 )

ProcessModel: Default DomainUsage: Single
Execution Runtime: net-4.5
.
Tests run: 1, Errors: 0, Failures: 0, Inconclusive: 0, Time: 1.2793066 seconds
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0

Without modifications to the console config file, the test hangs (and seems to use .NET 3.5 for execution):
NUnit-Console version 2.6.2.12296
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
   OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
  CLR Version: 2.0.50727.5477 ( Net 3.5 )

ProcessModel: Default DomainUsage: Single
Execution Runtime: net-3.5
.

My conclusion is that something within nunit.exe GUI program is done differently from the console, which would explain why ReSharper works (it's probably using console behind the scenes).

Is nunit.exe compilation somehow different from nunit-console.exe with respect to .NET framework?

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

Revision 3415 (https://bazaar.launchpad.net/~nunit-core/nunitv2/trunk/revision/3415) to NUnit source code on 08/08/2012 switched solution and project files from Visual Studio 2008 to Visual Studio 2010. While looking at the diffs, I noticed that src/GuiRunner/nunit-gui-exe/nunit-gui.exe.csproj has the following bootstrapper section:

  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
      <Visible>False</Visible>
      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
  </ItemGroup>

Same section for nunit-console.exe.csproj has this:
  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
      <Visible>False</Visible>
      <ProductName>Windows Installer 3.1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
  </ItemGroup>

Are the differences by design?

Revision history for this message
Charlie Poole (charlie.poole) wrote :

The BootstrapperPackage changes are not by design but are simply a consequence of building with newer tools. The change might matter if we were creating a bootstrapper application, but we don't do that. We rely on prior installation of .NET 2.0 through 4.5 and expect to be able to work in whatever version you have installed.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Reviewing this bug report, I don't see that we ever had you look at the NUnit internal trace log. You can do that by running with -trace:Debug and finding the log file under <application_data>/NUnit/logs. What we want to see in particular is how NUnit is evaluating your test assembly and deciding to run it under .net 3.5. That should be quite early in the log.

Charlie

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :
Download full text (6.3 KiB)

I do not have .NET 2.0 or 3.5 installed, only 4.5. Could that be the reason for hanging?

From nunit-gui_3304.log:
InternalTrace: Initializing at level Verbose
17:00:00.019 Info [ 1] AppEntry: Starting NUnit GUI
17:00:00.019 Info [ 1] AppEntry: Adding Services
17:00:00.019 Debug [ 1] ServiceManager: Added SettingsService
17:00:00.019 Debug [ 1] ServiceManager: Added DomainManager
17:00:00.019 Debug [ 1] ServiceManager: Request for service ISettings satisfied by SettingsService
17:00:00.019 Debug [ 1] ServiceManager: Added RecentFilesService
17:00:00.019 Debug [ 1] ServiceManager: Added ProjectService
17:00:00.035 Debug [ 1] ServiceManager: Added TestLoader
17:00:00.035 Debug [ 1] ServiceManager: Added AddinRegistry
17:00:00.035 Debug [ 1] ServiceManager: Added AddinManager
17:00:00.035 Debug [ 1] ServiceManager: Added TestAgency
17:00:00.035 Info [ 1] AppEntry: Initializing Services
17:00:00.035 Info [ 1] ServiceManager: Initializing SettingsService
17:00:00.035 Info [ 1] ServiceManager: Initializing DomainManager
17:00:00.035 Info [ 1] ServiceManager: Initializing RecentFilesService
17:00:00.035 Info [ 1] ServiceManager: Initializing ProjectService
17:00:00.035 Info [ 1] ServiceManager: Initializing TestLoader
17:00:00.035 Info [ 1] ServiceManager: Initializing AddinRegistry
17:00:00.035 Info [ 1] ServiceManager: Initializing AddinManager
17:00:00.035 Debug [ 1] ServiceManager: Request for service IAddinRegistry satisfied by AddinRegistry
17:00:00.035 Info [ 1] ServiceManager: Initializing TestAgency
17:00:00.097 Info [ 1] AppEntry: Initializing AmbientProperties
17:00:00.097 Info [ 1] AppEntry: Constructing Form
17:00:00.331 Debug [ 1] ServiceManager: Request for service RecentFiles satisfied by RecentFilesService
17:00:00.331 Debug [ 1] ServiceManager: Request for service TestLoader satisfied by TestLoader
17:00:00.331 Info [ 1] AppEntry: Starting Gui Application
17:00:00.378 Debug [ 1] ResultTabs: Updating tab pages
17:00:00.472 Info [ 1] TestLoader: Loading project C:\ObfuscatedPath\TestHPC.dll, default config
17:00:00.472 Debug [ 1] ServiceManager: Request for service ProjectService satisfied by ProjectService
17:00:00.487 Info [ 1] TestLoader: Loading tests for TestHPC.dll
17:00:00.503 Debug [ 1] RuntimeFrameworkSelector: Current framework is net-3.5
17:00:00.503 Debug [ 1] RuntimeFrameworkSelector: No specific framework requested
17:00:00.518 Debug [ 1] RuntimeFrameworkSelector: Assembly C:\ObfuscatedPath\TestHPC.dll uses version 4.0.30319
17:00:00.518 Debug [ 1] ServiceManager: Request for service TestAgency satisfied by TestAgency
17:00:00.518 Debug [ 1] RuntimeFrameworkSelector: Test will use net-4.0 framework
17:00:00.534 Info [ 1] ProcessRunner: Loading TestHPC.dll
17:00:00.534 Info [ 1] TestAgency: Getting agent for use under net-4.0
17:00:00.534 Debug [ 1] TestAgency: Using nunit-agent at C:\ObfuscatedPathToNUnit\NUnit\NUnit-2.6.2.12296\bin\nunit-agent.exe
17:00:00.534 Info [ 1] TestAgency: Launched Agent process 6900 - see nunit-agent_6900.log
17:00:00.534 Info [ 1] TestAgency: Command line: "C:\ObfuscatedPathToNUnit\NUnit\NUnit-2.6.2.12296\bin\nunit-agent.exe" 86f6d784-98e9-4744-b49b-3cdb45ed7cd2 tcp://127...

Read more...

Revision history for this message
Charlie Poole (charlie.poole) wrote :
Download full text (7.7 KiB)

Hi Oleg,

On Tue, Feb 18, 2014 at 2:14 PM, Oleg Gerovich
<email address hidden> wrote:
> I do not have .NET 2.0 or 3.5 installed, only 4.5. Could that be the
> reason for hanging?

That's very odd, because it says you are running 3.5. See notes in the log.

> >From nunit-gui_3304.log:
> InternalTrace: Initializing at level Verbose
> 17:00:00.019 Info [ 1] AppEntry: Starting NUnit GUI
> 17:00:00.019 Info [ 1] AppEntry: Adding Services
> 17:00:00.019 Debug [ 1] ServiceManager: Added SettingsService
> 17:00:00.019 Debug [ 1] ServiceManager: Added DomainManager
> 17:00:00.019 Debug [ 1] ServiceManager: Request for service ISettings satisfied by SettingsService
> 17:00:00.019 Debug [ 1] ServiceManager: Added RecentFilesService
> 17:00:00.019 Debug [ 1] ServiceManager: Added ProjectService
> 17:00:00.035 Debug [ 1] ServiceManager: Added TestLoader
> 17:00:00.035 Debug [ 1] ServiceManager: Added AddinRegistry
> 17:00:00.035 Debug [ 1] ServiceManager: Added AddinManager
> 17:00:00.035 Debug [ 1] ServiceManager: Added TestAgency
> 17:00:00.035 Info [ 1] AppEntry: Initializing Services
> 17:00:00.035 Info [ 1] ServiceManager: Initializing SettingsService
> 17:00:00.035 Info [ 1] ServiceManager: Initializing DomainManager
> 17:00:00.035 Info [ 1] ServiceManager: Initializing RecentFilesService
> 17:00:00.035 Info [ 1] ServiceManager: Initializing ProjectService
> 17:00:00.035 Info [ 1] ServiceManager: Initializing TestLoader
> 17:00:00.035 Info [ 1] ServiceManager: Initializing AddinRegistry
> 17:00:00.035 Info [ 1] ServiceManager: Initializing AddinManager
> 17:00:00.035 Debug [ 1] ServiceManager: Request for service IAddinRegistry satisfied by AddinRegistry
> 17:00:00.035 Info [ 1] ServiceManager: Initializing TestAgency
> 17:00:00.097 Info [ 1] AppEntry: Initializing AmbientProperties
> 17:00:00.097 Info [ 1] AppEntry: Constructing Form
> 17:00:00.331 Debug [ 1] ServiceManager: Request for service RecentFiles satisfied by RecentFilesService
> 17:00:00.331 Debug [ 1] ServiceManager: Request for service TestLoader satisfied by TestLoader
> 17:00:00.331 Info [ 1] AppEntry: Starting Gui Application
> 17:00:00.378 Debug [ 1] ResultTabs: Updating tab pages
> 17:00:00.472 Info [ 1] TestLoader: Loading project C:\ObfuscatedPath\TestHPC.dll, default config
> 17:00:00.472 Debug [ 1] ServiceManager: Request for service ProjectService satisfied by ProjectService
> 17:00:00.487 Info [ 1] TestLoader: Loading tests for TestHPC.dll
> 17:00:00.503 Debug [ 1] RuntimeFrameworkSelector: Current framework is net-3.5

Says you are running 3.5! You must actually have it installed somewhere.

> 17:00:00.503 Debug [ 1] RuntimeFrameworkSelector: No specific framework requested

No framework requested... you could use the gui menu to request a
specific framework.

> 17:00:00.518 Debug [ 1] RuntimeFrameworkSelector: Assembly C:\ObfuscatedPath\TestHPC.dll uses version 4.0.30319

Your assembly was analyzed and seen to be built with 4.0.30319. Note
that we can't distinguish 4.0 from 4.5 by this version number, but
NUnit takes that into account.

> 17:00:00.518 Debug [ 1] ServiceManager: Request for service TestAgency satisfied by TestAgency
> 17:00:00.518 Deb...

Read more...

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :
Download full text (3.4 KiB)

Hi Charlie,

You're right. I do have 3.5 since I'm on Windows 7, and it shows up under Windows features instead of the usual Add/Remove Programs. So that mystery is solved. :-)

I don't see a way to choose the framework in NUnit 2.6.2 GUI. I see Test Loader->Runtime Selection and there is a single checkbox "Select default runtime version based on target framework of test assembly". It is checked.

I do have "Reload before each test run" checked, so your analysis of the debug log is correct.

From nunit-agent_7248.log:
InternalTrace: Initializing at level Verbose
17:00:16.976 Info [ 1] NUnitTestAgent: Agent process 7248 starting
17:00:16.976 Info [ 1] NUnitTestAgent: Running under version 4.0.30319.18063, Net 4.5
17:00:16.976 Info [ 1] NUnitTestAgent: Adding Services
17:00:16.976 Debug [ 1] ServiceManager: Added SettingsService
17:00:16.976 Debug [ 1] ServiceManager: Added ProjectService
17:00:16.976 Debug [ 1] ServiceManager: Added DomainManager
17:00:16.976 Debug [ 1] ServiceManager: Added AddinRegistry
17:00:16.976 Debug [ 1] ServiceManager: Added AddinManager
17:00:16.976 Info [ 1] NUnitTestAgent: Initializing Services
17:00:16.992 Info [ 1] ServiceManager: Initializing SettingsService
17:00:16.992 Info [ 1] ServiceManager: Initializing ProjectService
17:00:16.992 Info [ 1] ServiceManager: Initializing DomainManager
17:00:16.992 Info [ 1] ServiceManager: Initializing AddinRegistry
17:00:16.992 Info [ 1] ServiceManager: Initializing AddinManager
17:00:16.992 Debug [ 1] ServiceManager: Request for service IAddinRegistry satisfied by AddinRegistry
17:00:16.992 Info [ 1] NUnitTestAgent: Connecting to TestAgency at tcp://127.0.0.1:64997/TestAgency
17:00:16.992 Info [ 1] NUnitTestAgent: Starting RemoteTestAgent
17:00:16.992 Info [ 1] RemoteTestAgent: Agent starting
17:00:17.007 Debug [ 1] RemoteTestAgent: Registered with TestAgency
17:00:17.007 Debug [ 1] NUnitTestAgent: Waiting for stopSignal
17:00:17.070 Info [ 5] TestDomain: Loading TestHPC.dll
17:00:17.070 Debug [ 5] ServiceManager: Request for service DomainManager satisfied by DomainManager
17:00:17.070 Debug [ 5] ServiceManager: Request for service ProjectService satisfied by ProjectService
17:00:17.085 Debug [ 5] ServiceManager: Request for service ISettings satisfied by SettingsService
17:00:17.085 Info [ 5] DomainManager: Creating AppDomain test-domain-TestHPC.dll
17:00:17.241 Info [ 5] TestDomain: Loading tests in AppDomain, see test-domain-TestHPC.dll_7248.log
17:00:17.663 Info [ 5] TestDomain: BeginRun in AppDomain test-domain-TestHPC.dll
17:14:20.717 Info [13] TestDomain: Unloading
17:14:20.717 Info [13] TestDomain: Stopping DomainAgent
17:14:20.717 Info [13] TestDomain: Unloading AppDomain test-domain-TestHPC.dll
17:14:20.717 Info [13] DomainManager: Unloading AppDomain test-domain-TestHPC.dll
17:14:20.733 Info [13] RemoteTestAgent: Stopping
17:14:20.733 Debug [ 1] NUnitTestAgent: Stop signal received
17:14:20.733 Info [ 1] NUnitTestAgent: Unregistering Channel
17:14:20.733 Info [ 1] NUnitTestAgent: Stopping all services
17:14:20.748 Info [ 1] ServiceManager: Stopping AddinManager
17:14:20.748 Info [ 1] ServiceManager: Stopping AddinRegistry
17:14:20.748 I...

Read more...

Revision history for this message
Oleg Gerovich (oleg-gerovich) wrote :

I just found File->Select Runtime. There are two items: 2.0.50727 (disabled and unselectable) and 4.0.30319 (enabled and selected). I don't know if I should expect 3.5 in that menu or there is some other selector.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.