Repository: phoenix
Updated Branches:
refs/heads/4.x-HBase-0.98 521b81928 -> 559dfa76b
PHOENIX-2840 Ignore flapping MemoryManagerTest.testWaitForMemoryAvailable unit
test
Conflicts:
phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f4c84a8a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f4c84a8a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f4c84a8a
Branch: refs/heads/4.x-HBase-0.98
Commit: f4c84a8a4f3d2f2e73bb993cdace78d60be84c81
Parents: 521b819
Author: James Taylor <[email protected]>
Authored: Fri Apr 22 16:45:08 2016 -0700
Committer: James Taylor <[email protected]>
Committed: Fri Apr 22 18:55:22 2016 -0700
----------------------------------------------------------------------
.../org/apache/phoenix/memory/MemoryManagerTest.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4c84a8a/phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
----------------------------------------------------------------------
diff --git
a/phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
b/phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
index 916329f..d050deb 100644
---
a/phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
+++
b/phoenix-core/src/test/java/org/apache/phoenix/memory/MemoryManagerTest.java
@@ -23,16 +23,14 @@ import static org.mockito.Matchers.anyLong;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.spy;
-import com.google.common.base.Stopwatch;
-import org.junit.Ignore;
-import org.junit.Test;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import org.apache.phoenix.memory.MemoryManager.MemoryChunk;
+import org.junit.Ignore;
+import org.junit.Test;
import org.mockito.Mockito;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
/**
*
* Tests for GlobalMemoryManager and ChildMemoryManager
@@ -75,6 +73,7 @@ public class MemoryManagerTest {
}
}
+ @Ignore("See PHOENIX-2840")
@Test
public void testWaitForMemoryAvailable() throws Exception {
final GlobalMemoryManager gmm = spy(new GlobalMemoryManager(100, 80));
@@ -98,7 +97,6 @@ public class MemoryManagerTest {
public void run() {
sleepFor(20);
// Will require waiting for a bit of time before t1 frees the
requested memory
- Stopwatch watch = new Stopwatch().start();
MemoryChunk c3 = rmm2.allocate(50);
Mockito.verify(gmm,
atLeastOnce()).waitForBytesToFree(anyLong(), anyLong());
c3.close();
@@ -189,7 +187,6 @@ public class MemoryManagerTest {
sleepFor(20);
ChildMemoryManager rmm2 = new ChildMemoryManager(gmm,100);
MemoryChunk c3 = rmm2.allocate(10);
- long startTime = System.currentTimeMillis();
c3.resize(60); // Test that resize waits if memory not
available
assertTrue(c1.getSize() == 20); // c1 was resized not closed
// we waited some time before the allocate happened