File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/test/java/redis/clients/jedis/authentication Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
import static org .junit .jupiter .api .Assertions .assertEquals ;
8
8
import static org .junit .jupiter .api .Assertions .assertNotNull ;
9
9
import static org .junit .jupiter .api .Assertions .assertThrows ;
10
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
10
11
import static org .junit .jupiter .api .Assertions .fail ;
11
12
import static org .junit .jupiter .api .Assumptions .assumeTrue ;
12
13
import static org .mockito .ArgumentMatchers .any ;
@@ -300,7 +301,7 @@ public void connectionAuthWithExpiredTokenTest() {
300
301
IdentityProviderConfig idpConfig = mock (IdentityProviderConfig .class );
301
302
when (idpConfig .getProvider ()).thenReturn (mockIdentityProvider );
302
303
303
- TokenAuthConfig tokenAuthConfig = EntraIDTokenAuthConfigBuilder .builder ()
304
+ TokenAuthConfig tokenAuthConfig = TokenAuthConfig .builder (). tokenRequestExecTimeoutInMs ( 4000 )
304
305
.identityProviderConfig (idpConfig ).expirationRefreshRatio (0.000001F ).build ();
305
306
AuthXManager authXManager = new AuthXManager (tokenAuthConfig );
306
307
DefaultJedisClientConfig jedisClientConfig = DefaultJedisClientConfig .builder ()
@@ -326,8 +327,9 @@ public void connectionAuthWithExpiredTokenTest() {
326
327
jedis .del (key );
327
328
}
328
329
});
329
-
330
- assertEquals ("WRONGPASS invalid username-password pair" , aclException .getMessage ());
330
+ String expectedError = "WRONGPASS invalid username-password pair" ;
331
+ assertTrue (aclException .getMessage ().startsWith (expectedError ),
332
+ "Expected '" + aclException .getMessage () + "' to start with '" + expectedError + "'" );
331
333
}
332
334
}
333
335
You can’t perform that action at this time.
0 commit comments