You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xk...@apache.org on 2019/09/23 15:07:01 UTC

[hadoop] branch branch-2 updated: HADOOP-16581. Addendum: Remove use of Java 8 functionality. Contributed by Masatake Iwasaki.

This is an automated email from the ASF dual-hosted git repository.

xkrogen pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 0050f43  HADOOP-16581. Addendum: Remove use of Java 8 functionality. Contributed by Masatake Iwasaki.
0050f43 is described below

commit 0050f4363ed909afb2e662cfc2ccb5f7ae224d45
Author: Erik Krogen <ek...@linkedin.com>
AuthorDate: Mon Sep 23 08:06:15 2019 -0700

    HADOOP-16581. Addendum: Remove use of Java 8 functionality. Contributed by Masatake Iwasaki.
---
 .../org/apache/hadoop/crypto/key/TestValueQueue.java  | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java
index 55a9280..6dc0c76 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/TestValueQueue.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.test.GenericTestUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
+import com.google.common.base.Supplier;
 import com.google.common.collect.Sets;
 
 public class TestValueQueue {
@@ -62,15 +63,19 @@ public class TestValueQueue {
     }
   }
 
-  private void waitForRefill(ValueQueue<?> valueQueue, String queueName, int queueSize)
+  private void waitForRefill(final ValueQueue<?> valueQueue,
+      final String queueName, final int queueSize)
       throws TimeoutException, InterruptedException {
-    GenericTestUtils.waitFor(() -> {
-      int size = valueQueue.getSize(queueName);
-      if (size != queueSize) {
-        LOG.info("Current ValueQueue size is " + size);
-        return false;
+    GenericTestUtils.waitFor(new Supplier<Boolean>() {
+      @Override
+      public Boolean get() {
+        int size = valueQueue.getSize(queueName);
+	if (size != queueSize) {
+	  LOG.info("Current ValueQueue size is " + size);
+	  return false;
+	}
+	return true;
       }
-      return true;
     }, 100, 3000);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org