You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by cs...@apache.org on 2024/01/27 15:38:38 UTC
(accumulo) branch main updated (b85cafb61c -> bce2ef2bfc)
This is an automated email from the ASF dual-hosted git repository.
cshannon pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
from b85cafb61c Merge branch '2.1'
add 1531fe5d7e Fix intermittent failure in AuthenticationTokenSecretManagerTest (#4203)
new bce2ef2bfc Merge branch '2.1'
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../security/delegation/AuthenticationTokenSecretManagerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
(accumulo) 01/01: Merge branch '2.1'
Posted by cs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cshannon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit bce2ef2bfc8b3a80dee5cf3e7313fb99b23bb7d1
Merge: b85cafb61c 1531fe5d7e
Author: Christopher L. Shannon <cs...@apache.org>
AuthorDate: Sat Jan 27 10:38:04 2024 -0500
Merge branch '2.1'
.../security/delegation/AuthenticationTokenSecretManagerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --cc server/base/src/test/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManagerTest.java
index 8a7b6ea7bf,00d9e6cf03..7198e16883
--- a/server/base/src/test/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManagerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/security/delegation/AuthenticationTokenSecretManagerTest.java
@@@ -207,9 -207,13 +207,15 @@@ public class AuthenticationTokenSecretM
// The passwords line up against multiple calls with the same ID
assertArrayEquals(password, secretManager.retrievePassword(id));
+ // Sleep 50 ms to make sure we generate another token for the test
+ // System.currentTimeMillis() is used as part of the token generation and if
+ // the test runs fast enough it can return the same value that was used
+ // when generating the first token and the test will fail
+ Thread.sleep(50);
+
// Make a second token for the same user
+ // Briefly sleep to guarantee token is unique, since the token is based on the time
+ Thread.sleep(100);
Entry<Token<AuthenticationTokenIdentifier>,AuthenticationTokenIdentifier> pair2 =
secretManager.generateToken(principal, cfg);
Token<AuthenticationTokenIdentifier> token2 = pair2.getKey();