public void SecondConnectionEstablishedIfFirstInUse()
 {
     var cf = new ConnectionPoolingConnectionFactory(rootConnectionFactory);
     var conn1 = cf.Get();
     var conn2 = cf.Get();
     AssertRealConnection1(conn1);
     AssertRealConnection2(conn2);
     conn1.Dispose();
     conn2.Dispose();
 }
예제 #2
0
        public void SecondConnectionEstablishedIfFirstInUse()
        {
            var cf    = new ConnectionPoolingConnectionFactory(rootConnectionFactory);
            var conn1 = cf.Get();
            var conn2 = cf.Get();

            AssertRealConnection1(conn1);
            AssertRealConnection2(conn2);
            conn1.Dispose();
            conn2.Dispose();
        }
        public void RetrieveSameConnectionOverAndOver()
        {
            var cf = new ConnectionPoolingConnectionFactory(rootConnectionFactory);

            var conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();
        }
예제 #4
0
        public void RetrieveSameConnectionOverAndOver()
        {
            var cf = new ConnectionPoolingConnectionFactory(rootConnectionFactory);

            var conn1 = cf.Get();

            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();

            conn1 = cf.Get();
            AssertRealConnection1(conn1);
            conn1.Dispose();
        }