summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorreger <reger18@arcor.de>2017-04-02 03:59:37 +0200
committerreger <reger18@arcor.de>2017-04-02 03:59:37 +0200
commit777cb5b812033ab2829f83ce80fe8bf7fe0315cd (patch)
treed133a96b5deec1a94a5071eb4f51fe6b0741ce56 /test
parentba339a2a454fb31d6527bd53f3652d75bc7674b4 (diff)
remove test case for Standard_MemoryControl which will always fail
see https://github.com/yacy/yacy_search_server/pull/114
Diffstat (limited to 'test')
-rw-r--r--test/java/net/yacy/kelondro/util/MemoryControlTest.java43
1 files changed, 0 insertions, 43 deletions
diff --git a/test/java/net/yacy/kelondro/util/MemoryControlTest.java b/test/java/net/yacy/kelondro/util/MemoryControlTest.java
deleted file mode 100644
index 5c8666436..000000000
--- a/test/java/net/yacy/kelondro/util/MemoryControlTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-
-package net.yacy.kelondro.util;
-
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-
-
-public class MemoryControlTest {
-
- final int onemb = 1024 * 1024;
-
- /**
- * Test of request method, of class MemoryControl.
- */
- @Test
- public void testRequest_StandardStrategy() {
- MemoryControl.setStandardStrategy(true);
- MemoryControl.setProperMbyte(24);
-
- int memblock = onemb * 13; // memsize to allocate
-
- int iterations = (int) MemoryControl.available() / memblock;
- int arraysize = (int) MemoryControl.maxMemory() / memblock + 10;
-
- byte[][] x = new byte[arraysize][];
-
- int i = 0;
-
- while (i < arraysize && MemoryControl.request(memblock, false)) {
- x[i] = new byte[memblock];
- // for realistic test produce some memory avail to GC
- if (MemoryControl.request(memblock, false)) {
- x[i] = new byte[memblock];
- }
-
- i++;
- }
- System.out.println("allocated " + i + " * " + memblock/onemb + " MB = " + i*memblock/onemb + " MB");
-
- assertTrue(i >= iterations);
- }
-
-}