@@ -132,7 +132,8 @@ public abstract class AbstractConnectionIntegrationTests {
132
132
133
133
protected List <Object > actual = new ArrayList <>();
134
134
135
- @ Autowired @ EnabledOnRedisDriver .DriverQualifier protected RedisConnectionFactory connectionFactory ;
135
+ @ Autowired
136
+ @ EnabledOnRedisDriver .DriverQualifier protected RedisConnectionFactory connectionFactory ;
136
137
137
138
protected RedisConnection byteConnection ;
138
139
@@ -588,8 +589,7 @@ public void testNullKey() {
588
589
try {
589
590
connection .decr ((String ) null );
590
591
fail ("Decrement should fail with null key" );
591
- } catch (Exception expected ) {
592
- }
592
+ } catch (Exception expected ) {}
593
593
}
594
594
595
595
@ Test
@@ -601,8 +601,7 @@ public void testNullValue() {
601
601
try {
602
602
connection .append (key , null );
603
603
fail ("Append should fail with null value" );
604
- } catch (DataAccessException expected ) {
605
- }
604
+ } catch (DataAccessException expected ) {}
606
605
}
607
606
608
607
@ Test
@@ -613,8 +612,7 @@ public void testHashNullKey() {
613
612
try {
614
613
connection .hExists (key , null );
615
614
fail ("hExists should fail with null key" );
616
- } catch (DataAccessException expected ) {
617
- }
615
+ } catch (DataAccessException expected ) {}
618
616
}
619
617
620
618
@ Test
@@ -627,8 +625,7 @@ public void testHashNullValue() {
627
625
try {
628
626
connection .hSet (key , field , null );
629
627
fail ("hSet should fail with null value" );
630
- } catch (DataAccessException expected ) {
631
- }
628
+ } catch (DataAccessException expected ) {}
632
629
}
633
630
634
631
@ Test
@@ -665,8 +662,7 @@ public void testPubSubWithNamedChannels() throws Exception {
665
662
666
663
try {
667
664
Thread .sleep (500 );
668
- } catch (InterruptedException ignore ) {
669
- }
665
+ } catch (InterruptedException ignore ) {}
670
666
671
667
// open a new connection
672
668
RedisConnection connection2 = connectionFactory .getConnection ();
@@ -709,8 +705,7 @@ public void testPubSubWithPatterns() throws Exception {
709
705
710
706
try {
711
707
Thread .sleep (500 );
712
- } catch (InterruptedException ignore ) {
713
- }
708
+ } catch (InterruptedException ignore ) {}
714
709
715
710
// open a new connection
716
711
RedisConnection connection2 = connectionFactory .getConnection ();
@@ -2641,8 +2636,7 @@ void scanShouldReadEntireValueRange() {
2641
2636
void scanWithType () {
2642
2637
2643
2638
assumeThat (isPipelinedOrQueueingConnection (connection ))
2644
- .describedAs ("SCAN is only available in non-pipeline | non-queueing mode" )
2645
- .isFalse ();
2639
+ .describedAs ("SCAN is only available in non-pipeline | non-queueing mode" ).isFalse ();
2646
2640
2647
2641
connection .set ("key" , "data" );
2648
2642
connection .lPush ("list" , "foo" );
@@ -2669,7 +2663,8 @@ private static List<String> toList(Cursor<byte[]> cursor) {
2669
2663
public void scanShouldReadEntireValueRangeWhenIndividualScanIterationsReturnEmptyCollection () {
2670
2664
2671
2665
byteConnection .openPipeline ();
2672
- IntStream .range (0 , 100 ).forEach (it -> byteConnection .stringCommands ().set ("key:%s" .formatted (it ).getBytes (StandardCharsets .UTF_8 ), "data" .getBytes (StandardCharsets .UTF_8 )));
2666
+ IntStream .range (0 , 100 ).forEach (it -> byteConnection .stringCommands ()
2667
+ .set ("key:%s" .formatted (it ).getBytes (StandardCharsets .UTF_8 ), "data" .getBytes (StandardCharsets .UTF_8 )));
2673
2668
byteConnection .closePipeline ();
2674
2669
2675
2670
Cursor <byte []> cursor = connection .scan (ScanOptions .scanOptions ().match ("key*9" ).count (10 ).build ());
@@ -3364,8 +3359,7 @@ void geoSearchShouldConsiderDistanceCorrectly() {
3364
3359
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3365
3360
3366
3361
actual .add (
3367
- connection .geoSearch (key , GeoReference .fromMember (PALERMO ),
3368
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3362
+ connection .geoSearch (key , GeoReference .fromMember (PALERMO ), GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3369
3363
newGeoSearchArgs ().limit (2 ).includeDistance ().includeCoordinates ()));
3370
3364
3371
3365
List <Object > results = getResults ();
@@ -3383,8 +3377,7 @@ void geoSearchStoreByMemberShouldStoreResult() {
3383
3377
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3384
3378
3385
3379
actual .add (connection .geoSearchStore ("georesults" , key , GeoReference .fromMember (PALERMO ),
3386
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3387
- newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3380
+ GeoShape .byRadius (new Distance (200 , KILOMETERS )), newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3388
3381
actual .add (connection .zScore ("georesults" , PALERMO .getName ()));
3389
3382
actual .add (connection .zScore ("georesults" , ARIGENTO .getName ()));
3390
3383
@@ -3402,8 +3395,7 @@ void geoSearchStoreByPointShouldStoreResult() {
3402
3395
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3403
3396
3404
3397
actual .add (connection .geoSearchStore ("georesults" , key , GeoReference .fromCoordinate (PALERMO ),
3405
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3406
- newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3398
+ GeoShape .byRadius (new Distance (200 , KILOMETERS )), newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3407
3399
actual .add (connection .zScore ("georesults" , PALERMO .getName ()));
3408
3400
actual .add (connection .zScore ("georesults" , ARIGENTO .getName ()));
3409
3401
@@ -3580,22 +3572,21 @@ void bitFieldIncrByWithOverflowShouldWorkCorrectly() {
3580
3572
assertThat (results .get (3 )).isNotNull ();
3581
3573
}
3582
3574
3583
- @ ParameterizedTest // DATAREDIS-2903
3584
- @ ValueSource (booleans = {false , true })
3585
- void bitFieldIncrByAndThenGetShouldWorkCorrectly (boolean isMultipliedByTypeLengthOffset ) {
3586
- var offset = isMultipliedByTypeLengthOffset
3587
- ? BitFieldSubCommands .Offset .offset (300L ).multipliedByTypeLength ()
3588
- : BitFieldSubCommands .Offset .offset (400L );
3575
+ @ ParameterizedTest // GH-2903
3576
+ @ ValueSource (booleans = { false , true })
3577
+ void bitFieldIncrByAndThenGetShouldWorkCorrectly (boolean isMultipliedByTypeLengthOffset ) {
3589
3578
3590
- actual . add ( connection . bitfield ( KEY_1 , create (). incr ( INT_8 ). valueAt ( offset ). by ( 1L )));
3591
- actual . add ( connection . bitfield ( KEY_1 , create (). get ( INT_8 ). valueAt ( offset )) );
3579
+ var offset = isMultipliedByTypeLengthOffset ? BitFieldSubCommands . Offset . offset ( 300L ). multipliedByTypeLength ()
3580
+ : BitFieldSubCommands . Offset . offset ( 400L );
3592
3581
3593
- List <Object > results = getResults ();
3582
+ actual .add (connection .bitfield (KEY_1 , create ().incr (INT_8 ).valueAt (offset ).by (1L )));
3583
+ actual .add (connection .bitfield (KEY_1 , create ().get (INT_8 ).valueAt (offset )));
3594
3584
3595
- assertThat (results ).hasSize (2 )
3596
- // should return same results after INCRBY and GET operations for bitfield with same offset
3597
- .containsExactly (List .of (1L ), List .of (1L ));
3598
- }
3585
+ List <Object > results = getResults ();
3586
+
3587
+ // should return same results after INCRBY and GET operations for bitfield with same offset
3588
+ assertThat (results ).containsExactly (List .of (1L ), List .of (1L ));
3589
+ }
3599
3590
3600
3591
@ Test // DATAREDIS-562
3601
3592
void bitfieldShouldAllowMultipleSubcommands () {
@@ -3884,8 +3875,8 @@ public void xPendingShouldLoadPendingMessagesForConsumer() {
3884
3875
actual .add (connection .xReadGroupAsString (Consumer .from ("my-group" , "my-consumer" ),
3885
3876
StreamOffset .create (KEY_1 , ReadOffset .lastConsumed ())));
3886
3877
3887
- actual .add (connection . xPending ( KEY_1 , "my-group" , "my-consumer" ,
3888
- org .springframework .data .domain .Range .unbounded (), 10L ));
3878
+ actual .add (
3879
+ connection . xPending ( KEY_1 , "my-group" , "my-consumer" , org .springframework .data .domain .Range .unbounded (), 10L ));
3889
3880
3890
3881
List <Object > results = getResults ();
3891
3882
assertThat (results ).hasSize (4 );
@@ -4106,7 +4097,7 @@ public void xinfoConsumersNoConsumer() {
4106
4097
assertThat (info .size ()).isZero ();
4107
4098
}
4108
4099
4109
- @ Test //GH-2345
4100
+ @ Test // GH-2345
4110
4101
public void zRangeStoreByScoreStoresKeys () {
4111
4102
String dstKey = KEY_2 ;
4112
4103
String srcKey = KEY_1 ;
@@ -4144,7 +4135,7 @@ public void zRangeStoreRevByScoreStoresKeys() {
4144
4135
assertThat ((LinkedHashSet <Object >) result .get (5 )).containsSequence (VALUE_3 , VALUE_4 );
4145
4136
}
4146
4137
4147
- @ Test //GH-2345
4138
+ @ Test // GH-2345
4148
4139
public void zRangeStoreByLexStoresKeys () {
4149
4140
String dstKey = KEY_2 ;
4150
4141
String srcKey = KEY_1 ;
0 commit comments