@@ -518,7 +518,6 @@ def test_transaction_in_race_condition
518518 assert_equal ( %w[ 3 4 ] , @client . call ( 'MGET' , '{key}1' , '{key}2' ) )
519519 end
520520
521- # for redis-rb
522521 def test_transaction_with_dedicated_watch_command
523522 @client . call ( 'MSET' , '{key}1' , '0' , '{key}2' , '0' )
524523
@@ -683,6 +682,10 @@ def test_other_pubsub_commands
683682 ps . close
684683 end
685684
685+ def test_with_method
686+ assert_raises ( NotImplementedError ) { @client . with }
687+ end
688+
686689 def test_dedicated_commands # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
687690 10 . times { |i | @client . call ( 'SET' , "key#{ i } " , i ) }
688691 wait_for_replication
@@ -819,44 +822,6 @@ def test_only_reshards_own_errors
819822 client2 . close
820823 end
821824
822- def test_pinning_single_key
823- got = @client . with ( key : 'key1' ) do |conn |
824- conn . call ( 'SET' , 'key1' , 'hello' )
825- conn . call ( 'GET' , 'key1' )
826- end
827- assert_equal ( 'hello' , got )
828- end
829-
830- def test_pinning_no_key
831- assert_raises ( ArgumentError ) do
832- @client . with { }
833- end
834- end
835-
836- def test_pinning_empty_key
837- assert_raises ( ArgumentError ) do
838- @client . with ( key : '' ) { }
839- end
840- end
841-
842- def test_pinning_two_keys
843- got = @client . with ( hashtag : 'slot' ) do |conn |
844- conn . call ( 'SET' , '{slot}key1' , 'v1' )
845- conn . call ( 'SET' , '{slot}key2' , 'v2' )
846- conn . call ( 'MGET' , '{slot}key1' , '{slot}key2' )
847- end
848- assert_equal ( %w[ v1 v2 ] , got )
849- end
850-
851- def test_pinning_hashtag_with_braces
852- got = @client . with ( hashtag : '{slot}' ) do |conn |
853- conn . call ( 'SET' , '{slot}key1' , 'v1' )
854- conn . call ( 'SET' , '{slot}key2' , 'v2' )
855- conn . call ( 'MGET' , '{slot}key1' , '{slot}key2' )
856- end
857- assert_equal ( %w[ v1 v2 ] , got )
858- end
859-
860825 private
861826
862827 def wait_for_replication
0 commit comments