Renamed some tests and changed amount tested.

This commit is contained in:
Harrison Deng 2020-04-28 17:18:36 -05:00
parent b49f50f728
commit 7a2a2d4ca6
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ import org.junit.jupiter.api.TestInstance.Lifecycle;
@TestInstance(Lifecycle.PER_CLASS) @TestInstance(Lifecycle.PER_CLASS)
public class CacheTest { public class CacheTest {
private volatile Cache<Integer, String> integerCache; private volatile Cache<Integer, String> integerCache;
private final int LARGE_CACHE_SIZE = 16384; private final int LARGE_CACHE_SIZE = 262144;
private final int[] answers = new int[LARGE_CACHE_SIZE]; private final int[] answers = new int[LARGE_CACHE_SIZE];
private final Random rand = new Random(); private final Random rand = new Random();
Cache<Integer, Integer> lCache = new Cache<>(LARGE_CACHE_SIZE); Cache<Integer, Integer> lCache = new Cache<>(LARGE_CACHE_SIZE);

View File

@ -67,8 +67,8 @@ public class UniBiomeIslandGeneratorTest {
} }
@Test @Test
public void testBiomeGenerationMultithread() { public void testBiomeGenerationMultithread1608Chunks() {
int chunksToDo = 1000; int chunksToDo = 268;
Runnable g1 = new BiomeGenTask(chunksToDo, 0); Runnable g1 = new BiomeGenTask(chunksToDo, 0);
Runnable g2 = new BiomeGenTask(chunksToDo, 1); Runnable g2 = new BiomeGenTask(chunksToDo, 1);
Runnable g3 = new BiomeGenTask(chunksToDo, 2); Runnable g3 = new BiomeGenTask(chunksToDo, 2);
@ -93,8 +93,8 @@ public class UniBiomeIslandGeneratorTest {
} }
@Test @Test
public void testBiomeGenerationSingleThread() { public void testBiomeGenerationSingleThread1608Chunks() {
Runnable g1 = new BiomeGenTask(6000, 0); Runnable g1 = new BiomeGenTask(1608, 0);
ExecutorService ex = Executors.newFixedThreadPool(6); ExecutorService ex = Executors.newFixedThreadPool(6);
ex.execute(g1); ex.execute(g1);