simbadzina commented on code in PR #6774:
URL: https://github.com/apache/hadoop/pull/6774#discussion_r1619473416
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java:
##########
@@ -111,6 +119,40 @@ public void testWarmUp() throws Exception {
vq.shutdown();
}
+ /**
+ * Verifies that Queue is initialized (Warmed-up) for partial keys
+ */
+ @Test(timeout = 30000)
+ public void testPartialWarmUp() throws Exception {
+ MockFiller filler = new MockFiller();
+ ValueQueue<String> vq =
+ new ValueQueue<>(10, 0.5f, 30000, 1,
+ SyncGenerationPolicy.ALL, filler);
+
+ @SuppressWarnings("unchecked")
+ LoadingCache<String,
LinkedBlockingQueue<KeyProviderCryptoExtension.EncryptedKeyVersion>> kq =
+ (LoadingCache<String,
LinkedBlockingQueue<KeyProviderCryptoExtension.EncryptedKeyVersion>>)
+ FieldUtils.getField(ValueQueue.class, "keyQueues", true).get(vq);
+
+ LoadingCache<String,
LinkedBlockingQueue<KeyProviderCryptoExtension.EncryptedKeyVersion>> kqSpy =
spy(kq);
Review Comment:
[ERROR]
/Users/sdzinama/dev/hadooptree/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java:137:
Line is longer than 100 characters (found 110). [LineLength]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]