You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2019/07/30 18:26:51 UTC
[flink] 06/06: [hotfix] Rename TestingSlotManagerFactory into
TestingSlotManagerBuilder
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 70fe6aa747ad021bbb8dd8cdc0beecc863f010be
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Tue Jul 30 14:55:24 2019 +0200
[hotfix] Rename TestingSlotManagerFactory into TestingSlotManagerBuilder
---
.../runtime/resourcemanager/StandaloneResourceManagerTest.java | 8 ++++----
...tingSlotManagerFactory.java => TestingSlotManagerBuilder.java} | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerTest.java
index 39d06a0..c39c14d 100755
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/StandaloneResourceManagerTest.java
@@ -27,7 +27,7 @@ import org.apache.flink.runtime.metrics.MetricRegistry;
import org.apache.flink.runtime.metrics.groups.JobManagerMetricGroup;
import org.apache.flink.runtime.metrics.groups.UnregisteredMetricGroups;
import org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager;
-import org.apache.flink.runtime.resourcemanager.slotmanager.TestingSlotManagerFactory;
+import org.apache.flink.runtime.resourcemanager.slotmanager.TestingSlotManagerBuilder;
import org.apache.flink.runtime.resourcemanager.utils.MockResourceManagerRuntimeServices;
import org.apache.flink.runtime.rpc.FatalErrorHandler;
import org.apache.flink.runtime.rpc.RpcService;
@@ -61,7 +61,7 @@ public class StandaloneResourceManagerTest extends TestLogger {
@Test
public void testStartupPeriod() throws Exception {
final LinkedBlockingQueue<Boolean> setFailUnfulfillableRequestInvokes = new LinkedBlockingQueue<>();
- final SlotManager slotManager = new TestingSlotManagerFactory()
+ final SlotManager slotManager = new TestingSlotManagerBuilder()
.setSetFailUnfulfillableRequestConsumer(setFailUnfulfillableRequestInvokes::add)
.createSlotManager();
final TestingStandaloneResourceManager rm = createResourceManager(Time.milliseconds(1L), slotManager);
@@ -75,7 +75,7 @@ public class StandaloneResourceManagerTest extends TestLogger {
@Test
public void testNoStartupPeriod() throws Exception {
final LinkedBlockingQueue<Boolean> setFailUnfulfillableRequestInvokes = new LinkedBlockingQueue<>();
- final SlotManager slotManager = new TestingSlotManagerFactory()
+ final SlotManager slotManager = new TestingSlotManagerBuilder()
.setSetFailUnfulfillableRequestConsumer(setFailUnfulfillableRequestInvokes::add)
.createSlotManager();
final TestingStandaloneResourceManager rm = createResourceManager(Time.milliseconds(-1L), slotManager);
@@ -89,7 +89,7 @@ public class StandaloneResourceManagerTest extends TestLogger {
@Test
public void testStartUpPeriodAfterLeadershipSwitch() throws Exception {
final LinkedBlockingQueue<Boolean> setFailUnfulfillableRequestInvokes = new LinkedBlockingQueue<>();
- final SlotManager slotManager = new TestingSlotManagerFactory()
+ final SlotManager slotManager = new TestingSlotManagerBuilder()
.setSetFailUnfulfillableRequestConsumer(setFailUnfulfillableRequestInvokes::add)
.createSlotManager();
final TestingStandaloneResourceManager rm = createResourceManager(Time.milliseconds(1L), slotManager);
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerFactory.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerBuilder.java
similarity index 87%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerFactory.java
rename to flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerBuilder.java
index a3e6ab4..f0c1c90 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerFactory.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManagerBuilder.java
@@ -23,11 +23,11 @@ import java.util.function.Consumer;
/**
* Factory for {@link TestingSlotManager}.
*/
-public class TestingSlotManagerFactory {
+public class TestingSlotManagerBuilder {
- private Consumer<Boolean> setFailUnfulfillableRequestConsumer;
+ private Consumer<Boolean> setFailUnfulfillableRequestConsumer = ignored -> {};
- public TestingSlotManagerFactory setSetFailUnfulfillableRequestConsumer(Consumer<Boolean> setFailUnfulfillableRequestConsumer) {
+ public TestingSlotManagerBuilder setSetFailUnfulfillableRequestConsumer(Consumer<Boolean> setFailUnfulfillableRequestConsumer) {
this.setFailUnfulfillableRequestConsumer = setFailUnfulfillableRequestConsumer;
return this;
}