This is an automated email from the ASF dual-hosted git repository.
duong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new e37b494d4b HDDS-8828. Adapt TestBlockTokens to be built with Hadoop
3.3 (#4878)
e37b494d4b is described below
commit e37b494d4b12fe77837bc9f13244366d2977f102
Author: Duong Nguyen <[email protected]>
AuthorDate: Mon Jun 12 18:22:55 2023 -0700
HDDS-8828. Adapt TestBlockTokens to be built with Hadoop 3.3 (#4878)
---
.../test/java/org/apache/hadoop/ozone/TestBlockTokens.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
index 6661c81b44..5a5fa8a1aa 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestBlockTokens.java
@@ -240,7 +240,10 @@ public final class TestBlockTokens {
Token<OzoneBlockTokenIdentifier> token = l.getToken();
OzoneBlockTokenIdentifier tokenId = token.decodeIdentifier();
tokenId.setSecretKeyId(UUID.randomUUID());
- token.setID(tokenId.getBytes());
+ Token<OzoneBlockTokenIdentifier> override = new Token<>(
+ tokenId.getBytes(), token.getPassword(),
+ token.getKind(), token.getService());
+ l.setToken(override);
}
}
@@ -259,7 +262,11 @@ public final class TestBlockTokens {
for (OmKeyLocationInfoGroup v : keyInfo.getKeyLocationVersions()) {
for (OmKeyLocationInfo l : v.getLocationList()) {
Token<OzoneBlockTokenIdentifier> token = l.getToken();
- token.setPassword(RandomUtils.nextBytes(100));
+ byte[] randomPassword = RandomUtils.nextBytes(100);
+ Token<OzoneBlockTokenIdentifier> override = new Token<>(
+ token.getIdentifier(), randomPassword,
+ token.getKind(), token.getService());
+ l.setToken(override);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]