title: CruiseControl.Net and NUnit - tests finish, but task doesn't?
body: <p>I've got a CruiseControl.Net setup using Nant to clean the previous logs, and then it kicks off a msbuild of a VS project, finally running nunit-console to execute the tests.</p>
  
  <p>It seems to build for a few seconds (fine) and then hops on to running the 600 tests, which takes about a minute.  However even though the log files are there, it sits there doing 'nothing' for 10 minutes, at which point the built times out and the process exits.  The CruiseControl.NET webpage then shows the result as failed, with an exception:</p>
  
  <pre><code>ThoughtWorks.CruiseControl.Core.Tasks.BuilderException: Command Line Build timed out (after 600 seconds)
     at ThoughtWorks.CruiseControl.Core.Tasks.ExecutableTask.Execute(IIntegrationResult result)
     at ThoughtWorks.CruiseControl.Core.Tasks.TaskBase.Run(IIntegrationResult result)
     at ThoughtWorks.CruiseControl.Core.Project.RunTask(ITask task, IIntegrationResult result, Boolean isPublisher)
     at ThoughtWorks.CruiseControl.Core.Project.RunTasks(IIntegrationResult result, IList tasksToRun, Dictionary`2 parameterValues)
     at ThoughtWorks.CruiseControl.Core.Project.Run(IIntegrationResult result)
     at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
     at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request) BaseDirectory: , Executable: C:\Program Files\NUnit 2.5.8\bin\net-2.0\nunit-console.exe
  </code></pre>
  
  <p>The ccnet.config script is below.  I've tried changing the timeout to 3 minutes just in case that was something to do with it, but even if that did work (it didn't) it's a dodgy hack, as by rights when the tests are finished running, they should exit gracefully!</p>
  
  <p>I've run the command at the commandline and confirmed it only takes about a minute to run.  Any theories?</p>
  
  <pre><code>&lt;cruisecontrol xmlns:cb="urn:ccnet.config.builder"&gt;
  
      &lt;project name="CodeTests"&gt;
        &lt;workingDirectory&gt;C:\Source\Wholesale\Comp.EventControl.TestingFramework\&lt;/workingDirectory&gt;
        &lt;artifactDirectory&gt;C:\Source\Wholesale\Comp.EventControl.TestingFramework\&lt;/artifactDirectory&gt;
  
      &lt;prebuild&gt;
      &lt;!-- clean nunit output to avoid CCNET reporting
             about previous build tests if current build fails --&gt;
        &lt;nant&gt;
          &lt;executable&gt;C:\Nant\bin\nant.exe
          &lt;/executable&gt;
          &lt;baseDirectory&gt;C:\Source\Wholesale\Comp.EventControl.TestingFramework&lt;/baseDirectory&gt;
          &lt;nologo&gt;false&lt;/nologo&gt;
          &lt;buildFile&gt;nant.build&lt;/buildFile&gt;
          &lt;targetList&gt;
            &lt;target&gt;cleanNunit&lt;/target&gt;
          &lt;/targetList&gt;
        &lt;/nant&gt;
      &lt;/prebuild&gt;
  
      &lt;tasks&gt;
          &lt;msbuild&gt;
              &lt;executable&gt;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
              &lt;/executable&gt;
              &lt;workingDirectory&gt;C:\Source\Wholesale\Comp.EventControl.TestingFramework\CodeReboot
              &lt;/workingDirectory&gt;
          &lt;projectFile&gt;CodeReboot.sln&lt;/projectFile &gt;
              &lt;buildArgs&gt;/noconsolelogger 
              /v:quiet 
              /noconlog 
              /p:Configuration=Debug
              /p:ReferencePath="C:\Program Files\NUnit 2.5.8\bin;C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
              /p:AdditionalReferencePath="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
              &lt;/buildArgs&gt;
              &lt;targets&gt;ReBuild&lt;/targets &gt;
              &lt;timeout&gt;180&lt;/timeout &gt;
              &lt;logger&gt;c:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCNet.dll&lt;/logger&gt;
  
          &lt;/msbuild&gt;
          &lt;exec&gt;
              &lt;executable&gt;C:\Program Files\NUnit 2.5.8\bin\net-2.0\nunit-console.exe
              &lt;/executable &gt;
              &lt;buildArgs&gt;/xml:C:\Source\Wholesale\Comp.EventControl.TestingFramework\nunit-results.xml
              /nologo C:\Source\Wholesale\Comp.EventControl.TestingFramework\CodeReboot\CodeReboot\bin\Debug\CodeReboot.dll
              &lt;/buildArgs&gt;
          &lt;/exec&gt;
      &lt;/tasks&gt;
      &lt;publishers&gt;
        &lt;merge&gt;
          &lt;files&gt;
            &lt;file&gt;C:\Source\Wholesale\Comp.EventControl.TestingFramework\nunit-results.xml
            &lt;/file&gt;
          &lt;/files&gt;
        &lt;/merge&gt;
        &lt;xmllogger /&gt;
        &lt;statistics /&gt;
        &lt;artifactcleanup cleanUpMethod="KeepLastXBuilds"
          cleanUpValue="20" /&gt;
      &lt;/publishers&gt;
  
      &lt;/project&gt;
  &lt;/cruisecontrol&gt;
  </code></pre>