File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Async/NHSpecificTest/GH1300 Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ public void InsertWithTooLongValuesShouldThrowAsync()
114
114
115
115
var sqlEx = ex . InnerException as SqlException ;
116
116
Assert . That ( sqlEx , Is . Not . Null ) ;
117
- Assert . That ( sqlEx . Number , Is . EqualTo ( 8152 ) ) ;
117
+ // Error code is different if verbose truncation warning is enabled
118
+ // See details: https://www.brentozar.com/archive/2019/03/how-to-fix-the-error-string-or-binary-data-would-be-truncated/
119
+ Assert . That ( sqlEx . Number , Is . EqualTo ( 8152 ) . Or . EqualTo ( 2628 ) ) ;
118
120
}
119
121
}
120
122
Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ public void InsertWithTooLongValuesShouldThrow()
103
103
104
104
var sqlEx = ex . InnerException as SqlException ;
105
105
Assert . That ( sqlEx , Is . Not . Null ) ;
106
- Assert . That ( sqlEx . Number , Is . EqualTo ( 8152 ) ) ;
106
+ // Error code is different if verbose truncation warning is enabled
107
+ // See details: https://www.brentozar.com/archive/2019/03/how-to-fix-the-error-string-or-binary-data-would-be-truncated/
108
+ Assert . That ( sqlEx . Number , Is . EqualTo ( 8152 ) . Or . EqualTo ( 2628 ) ) ;
107
109
}
108
110
}
109
111
You can’t perform that action at this time.
0 commit comments