@@ -130,7 +130,8 @@ public abstract class AbstractConnectionIntegrationTests {
130
130
131
131
protected List <Object > actual = new ArrayList <>();
132
132
133
- @ Autowired @ EnabledOnRedisDriver .DriverQualifier protected RedisConnectionFactory connectionFactory ;
133
+ @ Autowired
134
+ @ EnabledOnRedisDriver .DriverQualifier protected RedisConnectionFactory connectionFactory ;
134
135
135
136
protected RedisConnection byteConnection ;
136
137
@@ -586,8 +587,7 @@ public void testNullKey() {
586
587
try {
587
588
connection .decr ((String ) null );
588
589
fail ("Decrement should fail with null key" );
589
- } catch (Exception expected ) {
590
- }
590
+ } catch (Exception expected ) {}
591
591
}
592
592
593
593
@ Test
@@ -599,8 +599,7 @@ public void testNullValue() {
599
599
try {
600
600
connection .append (key , null );
601
601
fail ("Append should fail with null value" );
602
- } catch (DataAccessException expected ) {
603
- }
602
+ } catch (DataAccessException expected ) {}
604
603
}
605
604
606
605
@ Test
@@ -611,8 +610,7 @@ public void testHashNullKey() {
611
610
try {
612
611
connection .hExists (key , null );
613
612
fail ("hExists should fail with null key" );
614
- } catch (DataAccessException expected ) {
615
- }
613
+ } catch (DataAccessException expected ) {}
616
614
}
617
615
618
616
@ Test
@@ -625,8 +623,7 @@ public void testHashNullValue() {
625
623
try {
626
624
connection .hSet (key , field , null );
627
625
fail ("hSet should fail with null value" );
628
- } catch (DataAccessException expected ) {
629
- }
626
+ } catch (DataAccessException expected ) {}
630
627
}
631
628
632
629
@ Test
@@ -663,8 +660,7 @@ public void testPubSubWithNamedChannels() throws Exception {
663
660
664
661
try {
665
662
Thread .sleep (500 );
666
- } catch (InterruptedException ignore ) {
667
- }
663
+ } catch (InterruptedException ignore ) {}
668
664
669
665
// open a new connection
670
666
RedisConnection connection2 = connectionFactory .getConnection ();
@@ -707,8 +703,7 @@ public void testPubSubWithPatterns() throws Exception {
707
703
708
704
try {
709
705
Thread .sleep (500 );
710
- } catch (InterruptedException ignore ) {
711
- }
706
+ } catch (InterruptedException ignore ) {}
712
707
713
708
// open a new connection
714
709
RedisConnection connection2 = connectionFactory .getConnection ();
@@ -2639,8 +2634,7 @@ void scanShouldReadEntireValueRange() {
2639
2634
void scanWithType () {
2640
2635
2641
2636
assumeThat (isPipelinedOrQueueingConnection (connection ))
2642
- .describedAs ("SCAN is only available in non-pipeline | non-queueing mode" )
2643
- .isFalse ();
2637
+ .describedAs ("SCAN is only available in non-pipeline | non-queueing mode" ).isFalse ();
2644
2638
2645
2639
connection .set ("key" , "data" );
2646
2640
connection .lPush ("list" , "foo" );
@@ -3361,8 +3355,7 @@ void geoSearchShouldConsiderDistanceCorrectly() {
3361
3355
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3362
3356
3363
3357
actual .add (
3364
- connection .geoSearch (key , GeoReference .fromMember (PALERMO ),
3365
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3358
+ connection .geoSearch (key , GeoReference .fromMember (PALERMO ), GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3366
3359
newGeoSearchArgs ().limit (2 ).includeDistance ().includeCoordinates ()));
3367
3360
3368
3361
List <Object > results = getResults ();
@@ -3380,8 +3373,7 @@ void geoSearchStoreByMemberShouldStoreResult() {
3380
3373
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3381
3374
3382
3375
actual .add (connection .geoSearchStore ("georesults" , key , GeoReference .fromMember (PALERMO ),
3383
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3384
- newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3376
+ GeoShape .byRadius (new Distance (200 , KILOMETERS )), newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3385
3377
actual .add (connection .zScore ("georesults" , PALERMO .getName ()));
3386
3378
actual .add (connection .zScore ("georesults" , ARIGENTO .getName ()));
3387
3379
@@ -3399,8 +3391,7 @@ void geoSearchStoreByPointShouldStoreResult() {
3399
3391
actual .add (connection .geoAdd (key , Arrays .asList (ARIGENTO , CATANIA , PALERMO )));
3400
3392
3401
3393
actual .add (connection .geoSearchStore ("georesults" , key , GeoReference .fromCoordinate (PALERMO ),
3402
- GeoShape .byRadius (new Distance (200 , KILOMETERS )),
3403
- newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3394
+ GeoShape .byRadius (new Distance (200 , KILOMETERS )), newGeoSearchStoreArgs ().limit (2 ).storeDistance ()));
3404
3395
actual .add (connection .zScore ("georesults" , PALERMO .getName ()));
3405
3396
actual .add (connection .zScore ("georesults" , ARIGENTO .getName ()));
3406
3397
@@ -3577,22 +3568,21 @@ void bitFieldIncrByWithOverflowShouldWorkCorrectly() {
3577
3568
assertThat (results .get (3 )).isNotNull ();
3578
3569
}
3579
3570
3580
- @ ParameterizedTest // DATAREDIS-2903
3581
- @ ValueSource (booleans = {false , true })
3582
- void bitFieldIncrByAndThenGetShouldWorkCorrectly (boolean isMultipliedByTypeLengthOffset ) {
3583
- var offset = isMultipliedByTypeLengthOffset
3584
- ? BitFieldSubCommands .Offset .offset (300L ).multipliedByTypeLength ()
3585
- : BitFieldSubCommands .Offset .offset (400L );
3571
+ @ ParameterizedTest // GH-2903
3572
+ @ ValueSource (booleans = { false , true })
3573
+ void bitFieldIncrByAndThenGetShouldWorkCorrectly (boolean isMultipliedByTypeLengthOffset ) {
3586
3574
3587
- actual . add ( connection . bitfield ( KEY_1 , create (). incr ( INT_8 ). valueAt ( offset ). by ( 1L )));
3588
- actual . add ( connection . bitfield ( KEY_1 , create (). get ( INT_8 ). valueAt ( offset )) );
3575
+ var offset = isMultipliedByTypeLengthOffset ? BitFieldSubCommands . Offset . offset ( 300L ). multipliedByTypeLength ()
3576
+ : BitFieldSubCommands . Offset . offset ( 400L );
3589
3577
3590
- List <Object > results = getResults ();
3578
+ actual .add (connection .bitfield (KEY_1 , create ().incr (INT_8 ).valueAt (offset ).by (1L )));
3579
+ actual .add (connection .bitfield (KEY_1 , create ().get (INT_8 ).valueAt (offset )));
3591
3580
3592
- assertThat (results ).hasSize (2 )
3593
- // should return same results after INCRBY and GET operations for bitfield with same offset
3594
- .containsExactly (List .of (1L ), List .of (1L ));
3595
- }
3581
+ List <Object > results = getResults ();
3582
+
3583
+ // should return same results after INCRBY and GET operations for bitfield with same offset
3584
+ assertThat (results ).containsExactly (List .of (1L ), List .of (1L ));
3585
+ }
3596
3586
3597
3587
@ Test // DATAREDIS-562
3598
3588
void bitfieldShouldAllowMultipleSubcommands () {
@@ -3881,8 +3871,8 @@ public void xPendingShouldLoadPendingMessagesForConsumer() {
3881
3871
actual .add (connection .xReadGroupAsString (Consumer .from ("my-group" , "my-consumer" ),
3882
3872
StreamOffset .create (KEY_1 , ReadOffset .lastConsumed ())));
3883
3873
3884
- actual .add (connection . xPending ( KEY_1 , "my-group" , "my-consumer" ,
3885
- org .springframework .data .domain .Range .unbounded (), 10L ));
3874
+ actual .add (
3875
+ connection . xPending ( KEY_1 , "my-group" , "my-consumer" , org .springframework .data .domain .Range .unbounded (), 10L ));
3886
3876
3887
3877
List <Object > results = getResults ();
3888
3878
assertThat (results ).hasSize (4 );
@@ -4103,7 +4093,7 @@ public void xinfoConsumersNoConsumer() {
4103
4093
assertThat (info .size ()).isZero ();
4104
4094
}
4105
4095
4106
- @ Test //GH-2345
4096
+ @ Test // GH-2345
4107
4097
public void zRangeStoreByScoreStoresKeys () {
4108
4098
String dstKey = KEY_2 ;
4109
4099
String srcKey = KEY_1 ;
@@ -4141,7 +4131,7 @@ public void zRangeStoreRevByScoreStoresKeys() {
4141
4131
assertThat ((LinkedHashSet <Object >) result .get (5 )).containsSequence (VALUE_3 , VALUE_4 );
4142
4132
}
4143
4133
4144
- @ Test //GH-2345
4134
+ @ Test // GH-2345
4145
4135
public void zRangeStoreByLexStoresKeys () {
4146
4136
String dstKey = KEY_2 ;
4147
4137
String srcKey = KEY_1 ;
0 commit comments