flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [1/7] flink git commit: [tests] Minor cleanup removing duplicate mock invokables in various tests.
Date Tue, 18 Aug 2015 14:38:15 GMT
Repository: flink
Updated Branches:
  refs/heads/master 6eae11f34 -> 8602b7af0


[tests] Minor cleanup removing duplicate mock invokables in various tests.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8602b7af
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8602b7af
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8602b7af

Branch: refs/heads/master
Commit: 8602b7af0d048139ba90f36162e590da1050891d
Parents: 8a59f87
Author: Stephan Ewen <sewen@apache.org>
Authored: Mon Aug 17 18:21:20 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Tue Aug 18 16:37:41 2015 +0200

----------------------------------------------------------------------
 .../runtime/io/disk/iomanager/IOManagerITCase.java     |  4 ++--
 .../disk/iomanager/IOManagerPerformanceBenchmark.java  |  6 ++++--
 .../memory/MemoryManagerLazyAllocationTest.java        | 13 ++-----------
 .../apache/flink/runtime/memory/MemoryManagerTest.java | 12 +-----------
 .../apache/flink/runtime/memory/MemorySegmentTest.java |  3 ++-
 5 files changed, 11 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8602b7af/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java
index a0a8356..52908d3 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.util.List;
 import java.util.Random;
 
+import org.apache.flink.runtime.operators.testutils.DummyInvokable;
 import org.junit.Assert;
 import org.junit.After;
 import org.junit.Before;
@@ -34,7 +35,6 @@ import org.apache.flink.core.memory.DataInputView;
 import org.apache.flink.core.memory.DataOutputView;
 import org.apache.flink.core.memory.MemorySegment;
 import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
-import org.apache.flink.runtime.memory.MemoryManagerTest;
 import org.apache.flink.runtime.memorymanager.DefaultMemoryManager;
 
 /**
@@ -82,7 +82,7 @@ public class IOManagerITCase {
 	@SuppressWarnings("unchecked")
 	public void parallelChannelsTest() throws Exception {
 		final Random rnd = new Random(SEED);
-		final AbstractInvokable memOwner = new MemoryManagerTest.DummyInvokable();
+		final AbstractInvokable memOwner = new DummyInvokable();
 		
 		FileIOChannel.ID[] ids = new FileIOChannel.ID[NUM_CHANNELS];
 		BlockChannelWriter<MemorySegment>[] writers = new BlockChannelWriter[NUM_CHANNELS];

http://git-wip-us.apache.org/repos/asf/flink/blob/8602b7af/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerPerformanceBenchmark.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerPerformanceBenchmark.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerPerformanceBenchmark.java
index c71e181..3bdc9bd 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerPerformanceBenchmark.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerPerformanceBenchmark.java
@@ -31,17 +31,19 @@ import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
 import java.util.List;
 
+import org.apache.flink.runtime.operators.testutils.DummyInvokable;
 import org.apache.flink.types.IntValue;
 import org.junit.Assert;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.apache.flink.core.memory.InputViewDataInputStreamWrapper;
 import org.apache.flink.core.memory.MemorySegment;
 import org.apache.flink.core.memory.OutputViewDataOutputStreamWrapper;
 import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
-import org.apache.flink.runtime.memory.MemoryManagerTest;
 import org.apache.flink.runtime.memorymanager.DefaultMemoryManager;
+
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -62,7 +64,7 @@ public class IOManagerPerformanceBenchmark {
 	private static final int NUM_INTS_WRITTEN = 100000000;
 	
 	
-	private static final AbstractInvokable memoryOwner = new MemoryManagerTest.DummyInvokable();
+	private static final AbstractInvokable memoryOwner = new DummyInvokable();
 	
 	private DefaultMemoryManager memManager;
 	

http://git-wip-us.apache.org/repos/asf/flink/blob/8602b7af/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerLazyAllocationTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerLazyAllocationTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerLazyAllocationTest.java
index e077d08..fc88207 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerLazyAllocationTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerLazyAllocationTest.java
@@ -22,6 +22,8 @@ import org.apache.flink.core.memory.MemorySegment;
 import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
 import org.apache.flink.runtime.memorymanager.DefaultMemoryManager;
 import org.apache.flink.runtime.memorymanager.MemoryAllocationException;
+import org.apache.flink.runtime.operators.testutils.DummyInvokable;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -195,15 +197,4 @@ public class MemoryManagerLazyAllocationTest {
 		}
 		return true;
 	}
-	
-	/**
-	 * Utility class to serve as owner for the memory.
-	 */
-	public static final class DummyInvokable extends AbstractInvokable {
-		@Override
-		public void registerInputOutput() {}
-
-		@Override
-		public void invoke() throws Exception {}
-	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/8602b7af/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerTest.java
index c211357..c0f32ca 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemoryManagerTest.java
@@ -27,6 +27,7 @@ import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
 import org.apache.flink.runtime.memorymanager.DefaultMemoryManager;
 import org.apache.flink.runtime.memorymanager.MemoryAllocationException;
 
+import org.apache.flink.runtime.operators.testutils.DummyInvokable;
 import org.junit.Assert;
 import org.junit.After;
 import org.junit.Before;
@@ -194,15 +195,4 @@ public class MemoryManagerTest {
 		}
 		return true;
 	}
-	
-	/**
-	 * Utility class to serve as owner for the memory.
-	 */
-	public static final class DummyInvokable extends AbstractInvokable {
-		@Override
-		public void registerInputOutput() {}
-
-		@Override
-		public void invoke() throws Exception {}
-	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/8602b7af/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemorySegmentTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemorySegmentTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemorySegmentTest.java
index f9adb94..990dffa 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemorySegmentTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/memory/MemorySegmentTest.java
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
 import java.nio.ByteBuffer;
 import java.util.Random;
 
+import org.apache.flink.runtime.operators.testutils.DummyInvokable;
 import org.junit.Assert;
 import org.apache.flink.core.memory.MemorySegment;
 import org.apache.flink.runtime.memorymanager.DefaultMemoryManager;
@@ -52,7 +53,7 @@ public class MemorySegmentTest {
 	public void setUp() throws Exception{
 		try {
 			this.manager = new DefaultMemoryManager(MANAGED_MEMORY_SIZE, 1, PAGE_SIZE, true);
-			this.segment = manager.allocatePages(new MemoryManagerTest.DummyInvokable(), 1).get(0);
+			this.segment = manager.allocatePages(new DummyInvokable(), 1).get(0);
 			this.random = new Random(RANDOM_SEED);
 		} catch (Exception e) {
 			e.printStackTrace();


Mime
View raw message