@@ -15,6 +15,9 @@ internal class NpgsqlIntervalMappingTest : SqlTest
1515 private const string ValueColumnName = "Value" ;
1616 private const string TableName = "NpgsqlIntervalTest" ;
1717
18+ private TypeMapping longMapping ;
19+ private TypeMapping timeSpanMapping ;
20+
1821 #region Test case sources
1922 private static TimeSpan [ ] SecondsCases
2023 {
@@ -199,10 +202,6 @@ private static TimeSpan[] MultipartValuesSource
199202 }
200203 #endregion
201204
202- private TypeMapping longMapping ;
203- private TypeMapping timeSpanMapping ;
204-
205-
206205 protected override void CheckRequirements ( ) => Require . ProviderIs ( StorageProvider . PostgreSql ) ;
207206
208207 protected override void TestFixtureSetUp ( )
@@ -313,10 +312,9 @@ private void InsertValue(long id, TimeSpan testCase)
313312 longMapping . BindValue ( pId , id ) ;
314313 _ = command . Parameters . Add ( pId ) ;
315314
316- TimeSpan result = default ;
317315 using ( command )
318316 using ( var reader = command . ExecuteReader ( ) ) {
319- while ( reader . Read ( ) || result == default ) {
317+ while ( reader . Read ( ) ) {
320318 var idFromDb = ( long ) longMapping . ReadValue ( reader , 0 ) ;
321319 var valueFromDb = ( TimeSpan ) timeSpanMapping . ReadValue ( reader , 1 ) ;
322320 return ( idFromDb , valueFromDb ) ;
0 commit comments