Nunit reload progresses longer times

Asked by Joe Schell

Newer versions of Nunit take progressively longer time to reload a project after a rebuild.
Version 2.5.5 does not have this problem.

Note that one of the versions below is the newest development snapshot available.
I tried that because there is at least on similar report which suggested that this
might have been fixed in a newer version.

OS: Windows 7 64 bit
Running: nunit.exe
Visual Studio: 2008 with Resharper

How I tested - start with Nunit GUI Console up.
    - Use "Rebuild Solution" in Visual Studio
    - Wait for "Reloading..." to appear in Nunit.
    - Count seconds until "Reloading..." disappears.
    - Run test once
    - Repeat

-------------------------
Nunit: 2.5.8.10295

Test Loader Settings
   - Assembly Isolation:
            Run tests directly in the Nunit Process
            Use a single AppDomain for all tests
   - Assembly Reload:
            Reload when test assembly changes
   - Advanced:
            Enable Shadow Copy

Nunit: Start - 1 second (it loads test dll)
Nunit: After build - 1 second reload
Nunit: After build - 2 second reload
Nunit: After build - 4 second reload
Nunit: After build - 7 second reload
Nunit: After build - 11 second reload
Nunit: After build - 20 second reload

After last test I verified that there is only one "nunit.exe"
in the task manager listing.

-------------
I also tried this with 2.5.9.10320 (default install)
I explicitly linked in the framework dll to the project.

Nunit: Start - 1 second (it loads test dll)
Nunit: After build - 1 second reload
Nunit: After build - 2 second reload
Nunit: After build - 3 second reload
Nunit: After build - 5 second reload
Nunit: After build - 9 second reload
Nunit: After build - 17 second reload

--------------
I also tried this with 2.5.5.10112 (default install)
I explicitly linked in the framework dll to the project.

Nunit: Start - 1 second (it loads test dll)
Nunit: After build - 1 second reload
Nunit: After build - 1 second reload
Nunit: After build - 1 second reload
Nunit: After build - 1 second reload
Nunit: After build - 1 second reload
Nunit: After build - 1 second reload

===================================================
Code I used for testing.

using System;
using NUnit.Framework;

namespace ProgressSlow020508
{
public class Class1
{
    [Test]
    public void Test01_ValidateClass()
    {
        int i=47;
        Assert.AreEqual(47, i, "It worked");
    }
}
} // End of namespace

Question information

Language:
English Edit question
Status:
Solved
For:
NUnit V2 Edit question
Assignee:
No assignee Edit question
Solved by:
Joe Schell
Solved:
Last query:
Last reply:
Revision history for this message
Charlie Poole (charlie.poole) said :
#1

This is an existing bug (#673691) and has had some discussion on our nunit-discuss list. The timing info is helpful.

Charlie

Revision history for this message
Joe Schell (jschell) said :
#2

I saw that thread/bug.

Most of the posts seem to be about a different issue.

So can I consider it specifically to be about the problem that I posted?

Revision history for this message
Charlie Poole (charlie.poole) said :
#3

As far as the symptoms go, it seems to be the same bug. Depending on the speed of the system, you may or may not see the "flickering" described. It appears to happen on Windows only.

Of course, we'll know for sure when the bug is resolved.

Revision history for this message
Joe Schell (jschell) said :
#4

Then I will mark the question closed.

Revision history for this message
Joe Schell (jschell) said :
#5

Using 2.5.9.10320 I have confirmed that the same behavior exists on XP (32 bit) SP3.

Revision history for this message
Charlie Poole (charlie.poole) said :
#6

Thanks. Yes, it's independent of platform. What happens is that the first
rebuild causes 1 reload, the second 2, the third 4, and so on, doubling
each time. Each reload is resubscribing to the same event without removing
the old subscription.

I'll be checking in the fix in the next 10 minutes or so.

Charlie

On Fri, Dec 10, 2010 at 8:48 AM, Joe Schell
<email address hidden> wrote:
> Question #137096 on NUnit V2 changed:
> https://answers.launchpad.net/nunitv2/+question/137096
>
> Joe Schell posted a new comment:
> Using 2.5.9.10320 I have confirmed that the same behavior exists on XP
> (32 bit) SP3.
>
> --
> You received this question notification because you are an answer
> contact for NUnit V2.
>

Revision history for this message
Joe Schell (jschell) said :
#7

Verified that the problem no longer occurs in 2.5.9.10348