public void Mark_nhibernate_invalid_operation_exception_wrapped_exceptions_as_transient()
        {
            var e = new InvalidOperationException("Lazy load error", new GenericADOException("Wrapped exception", SqlExceptionGenerator.GetSqlException(40197)));

            Assert.That(new TTransientErrorDetectionStrategy().IsTransient(e));
        }
        public void Mark_nhibernate_transaction_wrapped_exceptions_as_transient()
        {
            var e = new TransactionException("Wrapped exception", SqlExceptionGenerator.GetSqlException(40197));

            Assert.That(new TTransientErrorDetectionStrategy().IsTransient(e));
        }
        public void Mark_unwrapped_exceptions_as_transient()
        {
            var e = SqlExceptionGenerator.GetSqlException(40197);

            Assert.That(new TTransientErrorDetectionStrategy().IsTransient(e));
        }
        public void Mark_wrapped_timeout_exception_as_transient([Values(-2, 121)] int errorCode)
        {
            var e = new GenericADOException("Wrapped exception", SqlExceptionGenerator.GetSqlException(errorCode));

            Assert.That(new SqlAzureTransientErrorDetectionStrategyWithTimeouts().IsTransient(e));
        }
Beispiel #5
0
        public void Mark_nhibernate_adonet_wrapped_exceptions_as_transient()
        {
            var e = new GenericADOException("Wrapped exception", SqlExceptionGenerator.GetSqlException(40197));

            Assert.IsTrue(new TTransientErrorDetectionStrategy().IsTransient(e));
        }
Beispiel #6
0
        public void Mark_unwrapped_timeout_exception_as_transient(int errorCode)
        {
            var e = SqlExceptionGenerator.GetSqlException(errorCode);

            Assert.IsTrue(new SqlAzureTransientErrorDetectionStrategyWithTimeouts().IsTransient(e));
        }