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

chesnay pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 15c3171b909e623c9c0ddc21581bab1532f4f04b
Author: Chesnay Schepler <[email protected]>
AuthorDate: Wed May 27 12:33:31 2020 +0200

    [hotfix][tests] Remove unused TestingScheduledExecutor
---
 .../runtime/util/TestingScheduledExecutor.java     | 62 ----------------------
 1 file changed, 62 deletions(-)

diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/util/TestingScheduledExecutor.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/util/TestingScheduledExecutor.java
deleted file mode 100644
index d9cfb11..0000000
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/util/TestingScheduledExecutor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.runtime.util;
-
-import org.apache.flink.runtime.concurrent.ScheduledExecutor;
-import org.apache.flink.runtime.concurrent.ScheduledExecutorServiceAdapter;
-import org.apache.flink.util.ExecutorUtils;
-
-import org.junit.rules.ExternalResource;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Provide an automatically shut down scheduled executor for testing.
- */
-public class TestingScheduledExecutor extends ExternalResource {
-
-       private long shutdownTimeoutMillis;
-       private ScheduledExecutor scheduledExecutor;
-       private ScheduledExecutorService innerExecutorService;
-
-       public TestingScheduledExecutor() {
-               this(500L);
-       }
-
-       public TestingScheduledExecutor(long shutdownTimeoutMillis) {
-               this.shutdownTimeoutMillis = shutdownTimeoutMillis;
-       }
-
-       @Override
-       public void before() {
-               this.innerExecutorService = 
Executors.newSingleThreadScheduledExecutor();
-               this.scheduledExecutor = new 
ScheduledExecutorServiceAdapter(innerExecutorService);
-       }
-
-       @Override
-       protected void after() {
-               ExecutorUtils.gracefulShutdown(shutdownTimeoutMillis, 
TimeUnit.MILLISECONDS, innerExecutorService);
-       }
-
-       protected ScheduledExecutor getScheduledExecutor() {
-               return scheduledExecutor;
-       }
-}

Reply via email to