views:

12

answers:

0

I have a simple test written like this

public class Test
{
     [ThreadStatic]
     private static ServiceClient client;
     [TestMethod]
     public void TestCase1()
     {

      If( client == null)
      {
       .... //instantiate client
      } 
      client.CallMyServiceMethod()

     }
     [TestMethod]
     public void TestCase2()
     {
        using(var newClient = new ServiceClient())
        {
            newClient.CallMyServiceMethod()   
        }
     }

The percentage of new users is set to 100 % for the test, and the user load is constant load of 1.

But the response time for TestCase1 is about 3 times better than TestCase2.

Can someone see what i am missing here ?

many thanks