@@ -8,13 +8,13 @@ namespace StackExchange.Redis.Tests.Issues;
88public class Issue1103Tests ( ITestOutputHelper output ) : TestBase ( output )
99{
1010 [ Theory ]
11- [ InlineData ( 142205255210238005UL , ( int ) StorageType . Int64 ) ]
11+ [ InlineData ( 142205255210238005UL , ( int ) StorageType . Int64 , ( int ) StorageType . Int64 ) ]
1212 [ InlineData ( ulong . MaxValue , ( int ) StorageType . UInt64 ) ]
13- [ InlineData ( ulong . MinValue , ( int ) StorageType . Int64 ) ]
13+ [ InlineData ( ulong . MinValue , ( int ) StorageType . Int64 , ( int ) StorageType . ShortBlob ) ]
1414 [ InlineData ( 0x8000000000000000UL , ( int ) StorageType . UInt64 ) ]
1515 [ InlineData ( 0x8000000000000001UL , ( int ) StorageType . UInt64 ) ]
16- [ InlineData ( 0x7FFFFFFFFFFFFFFFUL , ( int ) StorageType . Int64 ) ]
17- public async Task LargeUInt64StoredCorrectly ( ulong value , int storageType )
16+ [ InlineData ( 0x7FFFFFFFFFFFFFFFUL , ( int ) StorageType . Int64 , ( int ) StorageType . Int64 ) ] // long.MaxValue: 19-byte canonical int => Int64 on read
17+ public async Task LargeUInt64StoredCorrectly ( ulong value , int storageType , int fromRedisType = ( int ) StorageType . ByteArray )
1818 {
1919 await using var conn = Create ( ) ;
2020
@@ -29,7 +29,7 @@ public async Task LargeUInt64StoredCorrectly(ulong value, int storageType)
2929 var fromRedis = db . StringGet ( key ) ;
3030
3131 Log ( $ "{ fromRedis . Type } : { fromRedis } ") ;
32- Assert . Equal ( StorageType . ByteArray , fromRedis . Type ) ;
32+ Assert . Equal ( ( StorageType ) fromRedisType , fromRedis . Type ) ;
3333 Assert . Equal ( value , ( ulong ) fromRedis ) ;
3434 Assert . Equal ( value . ToString ( CultureInfo . InvariantCulture ) , fromRedis . ToString ( ) ) ;
3535
0 commit comments