@@ -131,7 +131,7 @@ public void testTokenRefresh() throws BackgroundException, InterruptedException
131131 * Fetch OpenID Connect Id token initially fails because of invalid refresh token. Must re-run OAuth flow.
132132 */
133133 @ Test
134- public void testLoginInvalidOAuthTokensLogin () throws Exception {
134+ public void testLoginInvalidOAuthTokens () throws Exception {
135135 final Protocol profile = new ProfilePlistReader (new ProtocolFactory (new HashSet <>(Collections .singleton (new S3Protocol ())))).read (
136136 AbstractAssumeRoleWithWebIdentityTest .class .getResourceAsStream ("/S3 (OIDC).cyberduckprofile" ));
137137 final Credentials credentials = new Credentials ("rouser" , "rouser" )
@@ -146,12 +146,7 @@ public void testLoginInvalidOAuthTokensLogin() throws Exception {
146146 assertNotNull (session .open (new DisabledProxyFinder (), new DisabledHostKeyCallback (), new DisabledLoginCallback (), new DisabledCancelCallback ()));
147147 assertTrue (session .isConnected ());
148148 assertNotNull (session .getClient ());
149- session .login (new DisabledLoginCallback (), new DisabledCancelCallback ());
150- assertNotEquals (OAuthTokens .EMPTY , credentials .getOauth ());
151- assertNotEquals (TemporaryAccessTokens .EMPTY , credentials .getTokens ());
152- credentials .setOauth (OAuthTokens .EMPTY ).setTokens (TemporaryAccessTokens .EMPTY );
153- new S3BucketListService (session ).list (
154- new Path (String .valueOf (Path .DELIMITER ), EnumSet .of (Path .Type .volume , Path .Type .directory )), new DisabledListProgressListener ());
149+ assertThrows (LoginFailureException .class , () -> session .login (new DisabledLoginCallback (), new DisabledCancelCallback ()));
155150 }
156151
157152 /**
0 commit comments