Skip to content

Commit 170daff

Browse files
committed
Test case ShouldThrowWhenByteArrayTooLong() doesn't apply to ODBC since the ODBC driver doesn't set default parameter lengths.
1 parent 3cdbb5d commit 170daff

File tree

1 file changed

+7
-0
lines changed
  • src/NHibernate.Test/NHSpecificTest/NH3121

1 file changed

+7
-0
lines changed

src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Linq;
44
using System.Reflection;
55
using NHibernate.Dialect;
6+
using NHibernate.Driver;
67
using NUnit.Framework;
78

89
namespace NHibernate.Test.NHSpecificTest.NH3121
@@ -23,6 +24,12 @@ protected override bool AppliesTo(Dialect.Dialect dialect)
2324
[Test]
2425
public void ShouldThrowWhenByteArrayTooLong()
2526
{
27+
// For SQL Server only the SqlClientDriver sets parameter lengths
28+
// even when there is no length specified in the mapping. The ODBC
29+
// driver won't cause the truncation issue and hence not the exception.
30+
if (!(sessions.ConnectionProvider.Driver is SqlClientDriver))
31+
Assert.Ignore("Test limited to drivers that sets parameter length even with no length specified in the mapping.");
32+
2633
const int reportSize = 17158;
2734
var random = new Random();
2835

0 commit comments

Comments
 (0)