Skip to content

Commit 001d16c

Browse files
committed
Fix test compile issue
Rebasing #64259 on top of #64031 introduced a test compile error, but it looks like PR-CI failed to run the correct set of checks so the PR was green and was merged. This change fixes those compile issues.
1 parent 87f7738 commit 001d16c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/TokenServiceTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,12 @@ public void testInvalidateRefreshToken() throws Exception {
527527
when(securityMainIndex.indexExists()).thenReturn(true);
528528
TokenService tokenService = createTokenService(tokenServiceEnabledSettings, systemUTC());
529529
Authentication authentication = new Authentication(new User("joe", "admin"), new RealmRef("native_realm", "native", "node1"), null);
530-
PlainActionFuture<Tuple<String, String>> tokenFuture = new PlainActionFuture<>();
530+
PlainActionFuture<TokenService.CreateTokenResult> tokenFuture = new PlainActionFuture<>();
531531
final String userTokenId = UUIDs.randomBase64UUID();
532532
final String rawRefreshToken = UUIDs.randomBase64UUID();
533533
tokenService.createOAuth2Tokens(userTokenId, rawRefreshToken, authentication, authentication, Collections.emptyMap(), tokenFuture);
534-
final String accessToken = tokenFuture.get().v1();
535-
final String clientRefreshToken = tokenFuture.get().v2();
534+
final String accessToken = tokenFuture.get().getAccessToken();
535+
final String clientRefreshToken = tokenFuture.get().getRefreshToken();
536536
assertNotNull(accessToken);
537537
mockFindTokenFromRefreshToken(rawRefreshToken, buildUserToken(tokenService, userTokenId, authentication), null);
538538

@@ -553,12 +553,12 @@ public void testInvalidateRefreshTokenThatIsAlreadyInvalidated() throws Exceptio
553553
when(securityMainIndex.indexExists()).thenReturn(true);
554554
TokenService tokenService = createTokenService(tokenServiceEnabledSettings, systemUTC());
555555
Authentication authentication = new Authentication(new User("joe", "admin"), new RealmRef("native_realm", "native", "node1"), null);
556-
PlainActionFuture<Tuple<String, String>> tokenFuture = new PlainActionFuture<>();
556+
PlainActionFuture<TokenService.CreateTokenResult> tokenFuture = new PlainActionFuture<>();
557557
final String userTokenId = UUIDs.randomBase64UUID();
558558
final String rawRefreshToken = UUIDs.randomBase64UUID();
559559
tokenService.createOAuth2Tokens(userTokenId, rawRefreshToken, authentication, authentication, Collections.emptyMap(), tokenFuture);
560-
final String accessToken = tokenFuture.get().v1();
561-
final String clientRefreshToken = tokenFuture.get().v2();
560+
final String accessToken = tokenFuture.get().getAccessToken();
561+
final String clientRefreshToken = tokenFuture.get().getRefreshToken();
562562
assertNotNull(accessToken);
563563
mockFindTokenFromRefreshToken(rawRefreshToken, buildUserToken(tokenService, userTokenId, authentication),
564564
new RefreshTokenStatus(true, randomAlphaOfLength(12), randomAlphaOfLength(6), false, null, null, null, null)

0 commit comments

Comments
 (0)