File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/test/java/redis/clients/jedis/commands/jedis Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 30
30
31
31
import redis .clients .jedis .Jedis ;
32
32
import redis .clients .jedis .Protocol ;
33
+ import redis .clients .jedis .PushConsumer ;
33
34
import redis .clients .jedis .RedisProtocol ;
34
35
import redis .clients .jedis .Response ;
35
36
import redis .clients .jedis .Transaction ;
36
37
import redis .clients .jedis .exceptions .JedisConnectionException ;
37
38
import redis .clients .jedis .exceptions .JedisDataException ;
39
+ import redis .clients .jedis .util .RedisInputStream ;
38
40
import redis .clients .jedis .util .SafeEncoder ;
39
41
40
42
@ ParameterizedClass
@@ -176,7 +178,7 @@ public void discardFail() {
176
178
trans .set ("b" , "b" );
177
179
178
180
try (MockedStatic <Protocol > protocol = Mockito .mockStatic (Protocol .class )) {
179
- protocol .when (() -> Protocol .read (any ())).thenThrow (JedisConnectionException .class );
181
+ protocol .when (() -> Protocol .read (any (RedisInputStream . class ), any ( PushConsumer . class ))).thenThrow (JedisConnectionException .class );
180
182
181
183
trans .discard ();
182
184
fail ("Should get mocked JedisConnectionException." );
@@ -196,7 +198,7 @@ public void execFail() {
196
198
trans .set ("b" , "b" );
197
199
198
200
try (MockedStatic <Protocol > protocol = Mockito .mockStatic (Protocol .class )) {
199
- protocol .when (() -> Protocol .read (any ())).thenThrow (JedisConnectionException .class );
201
+ protocol .when (() -> Protocol .read (any (RedisInputStream . class ), any ( PushConsumer . class ))).thenThrow (JedisConnectionException .class );
200
202
201
203
trans .exec ();
202
204
fail ("Should get mocked JedisConnectionException." );
You can’t perform that action at this time.
0 commit comments