forked from iKefir/java-advanced-2017
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ListMapperTest.java
40 lines (33 loc) · 1.04 KB
/
ListMapperTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package info.kgeorgiy.java.advanced.mapper;
import info.kgeorgiy.java.advanced.concurrent.ListIPTest;
import info.kgeorgiy.java.advanced.concurrent.ScalarIP;
import org.junit.AfterClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import java.util.Arrays;
/**
* @author Georgiy Korneev ([email protected])
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ListMapperTest extends ListIPTest {
public ListMapperTest() {
factors = Arrays.asList(1, 2, 5, 10);
}
@Test
public void test05_sleepPerformance() throws InterruptedException {
new ScalarMapperTest().test05_sleepPerformance();
}
@Override
protected ScalarIP createInstance(final int threads) {
return ScalarMapperTest.instance(threads);
}
@Override
protected int getSubtasks(final int threads, final int totalThreads) {
return ScalarMapperTest.subtasks(totalThreads);
}
@AfterClass
public static void close() {
ScalarMapperTest.close();
}
}