Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
CreateMock runs two to four times slower when debugging (vs. just run)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 32 of 32 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Karl Lew  
View profile  
 More options Feb 15 2008, 9:35 pm
From: Karl Lew <well...@gmail.com>
Date: Fri, 15 Feb 2008 18:35:03 -0800 (PST)
Local: Fri, Feb 15 2008 9:35 pm
Subject: Re: CreateMock runs two to four times slower when debugging (vs. just run)
Oren,

Here's the updated proposal for PersistentMockRepository with the
feedback incorporated.

--Karl

p.s., Fabian/Patrick, thanks for your help and guidance!
p.p.s., MbUnit can't run/debug the PersistentMockRepositoryTests with
Resharper. I had to switch to NUnit2.4.1 to develop the unit tests.
For example, here's just one of many problems encountered:
  "The process cannot access the file 'C:\Program Files\JetBrains
\ReSharper\v3.1\vs8.0\Bin\DevExpress.Data.v7.1.dll' because it is
being used by another process."

/// <summary>
/// PersistentMockRepository extends MockRepository with the
capability
/// to generate persistent assemblies for mock objects that change
rarely.
/// </summary>
public class PersistentMockRepository : MockRepository
{
        /// <summary>
        /// Return the singleton PersistentMockRepository, loading it from a
previously
        /// saved assembly if present.
        /// <see cref="m_IsAssemblyLoadedFromCache"/>
        /// </summary>
        public static PersistentMockRepository GetInstance {get; }

        /// <summary>
        /// Save the currently compiled assembly for re-use as an assembly
with the
        /// returned path name (e.g., "{some path}/CastleDynProxy2.dll").
This call can
        /// only be executed ONCE.
        /// </summary>
        public string SaveAssembly() ...

        /// <summary>
        /// Attempt to delete the cached assembly and return true if the
cached assembly
        /// was indeed found and deleted.
        /// </summary>
        /// <returns></returns>
        public static bool DeleteAssembly() ...

        /// <summary>
        /// Return true if this assembly was loaded from the location
        /// specified by a previous call to SaveAssembly. A
PersistentMockRepository
        /// that has been loaded cannot be extended to create proxies that
are not
        /// contained within the loaded assembly (i.e., a loaded
PersistentMockRepostiory
        /// is frozen.)
        /// </summary>
        public bool IsAssemblyLoadedFromCache  {get;}

        /// <summary>
        /// Return file path to be used for cached assembly
        /// </summary>
        /// <returns></returns>
        public static string CachedAssemblyFilePath {get;}

        /// <summary>
        /// Returns path to cache metadata xml file which is used to
determine
        /// timestamps of referenced assemblies in order to invalidate the
cache
        /// when they change.
        /// </summary>
        public static string PersistentMockRepositoryXmlPath {get;}


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options Feb 16 2008, 3:20 am
From: "Ayende Rahien" <aye...@ayende.com>
Date: Sat, 16 Feb 2008 10:20:43 +0200
Local: Sat, Feb 16 2008 3:20 am
Subject: Re: [RhinoMocks] Re: CreateMock runs two to four times slower when debugging (vs. just run)

Do I need to do anything special (aside from using the persistent mock
repository to use it?

On 2/16/08, Karl Lew <well...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Lew  
View profile  
 More options Feb 18 2008, 12:05 pm
From: Karl Lew <well...@gmail.com>
Date: Mon, 18 Feb 2008 09:05:26 -0800 (PST)
Local: Mon, Feb 18 2008 12:05 pm
Subject: Re: CreateMock runs two to four times slower when debugging (vs. just run)
Well, yes and no. Regarding client usage, I think that there are no
external dependencies or special actions. However, one issue to
consider is that building Rhino will now require NUnit 2.4.1 as well
as MBUnit. I believe we can simply add an NUnit.2.4.1 directory to
SharedLibs to address this new requirement.

Today I will integrate the updated RhinoMocks into our own application
production code unit tests to evaluate the new
PersistentMockRepository api and implementation. Stay tuned!

8) Karl

p.s., I uploaded the current versions of the files to the group. If
you have a moment, please review: --Thanks!
http://rhinomocks.googlegroups.com/web/PersistentMockRepositoryTests.cs
http://rhinomocks.googlegroups.com/web/PersistentMockRepository.cs

p.s., attached

On Feb 16, 12:20 am, "Ayende Rahien" <aye...@ayende.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options Feb 18 2008, 7:08 pm
From: "Ayende Rahien" <aye...@ayende.com>
Date: Tue, 19 Feb 2008 02:08:40 +0200
Local: Mon, Feb 18 2008 7:08 pm
Subject: Re: [RhinoMocks] Re: CreateMock runs two to four times slower when debugging (vs. just run)

In general, Rhino Mocks cannot have a dependency on a testing framework.
The _tests_ can do whatever they want, but the Rhino.Mocks.dll assumes only
CLR 2.0

I'll look at the patches in detail in the next few days, no time at the
moment

On 2/18/08, Karl Lew <well...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Lew  
View profile  
 More options Feb 18 2008, 7:32 pm
From: Karl Lew <well...@gmail.com>
Date: Mon, 18 Feb 2008 16:32:26 -0800 (PST)
Local: Mon, Feb 18 2008 7:32 pm
Subject: Re: CreateMock runs two to four times slower when debugging (vs. just run)
On Feb 18, 4:08 pm, "Ayende Rahien" <aye...@ayende.com> wrote:

> In general, Rhino Mocks cannot have a dependency on a testing framework.
> The _tests_ can do whatever they want, but the Rhino.Mocks.dll assumes only
> CLR 2.0

Absolutely. We only require a change to the Rhino.Mocks.Tests 2.0
project. The production Rhino.Mocks is untouched and has no dependency
on nunit.

I've updated the wiki with information on PersistentMockRepository:
http://www.ayende.com/Wiki/(S(gx4imde23krdise4vch42zv2))/PersistentMo...

Initial tests with our application are promising. We are actually able
to debug our unit tests without crashing MSVS2005!!! WOOHOO!!!
This is a tremendous win for us and frees us from having to debug unit
tests by using WriteLine() statements.

8) Karl

p.s. A prerequisite for PersistentMockRepository is Castle-trunk 4800
with Fabian's changes. Although I could attempt to update the Rhino
trunk with Castle-trunk 4800, I'm nervous about doing that myself and
afraid I'd botch it. Would you mind doing that?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 3 2008, 6:56 pm
From: "Ayende Rahien" <aye...@ayende.com>
Date: Sun, 4 May 2008 01:56:06 +0300
Local: Sat, May 3 2008 6:56 pm
Subject: Re: [RhinoMocks] Re: CreateMock runs two to four times slower when debugging (vs. just run)

I am pretty ashamed of myself, for letting this lie aside for so long.Reviewed
and committed, thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ayende Rahien  
View profile  
 More options May 15 2008, 6:42 am
From: "Ayende Rahien" <aye...@ayende.com>
Date: Thu, 15 May 2008 13:42:39 +0300
Local: Thurs, May 15 2008 6:42 am
Subject: Re: [RhinoMocks] Re: CreateMock runs two to four times slower when debugging (vs. just run)

I have reverted this patch, the tests are not running in a consistent
manner.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »