Fix unit test build.

Change-Id: Id2c92c5035d7b357fa66c7ca671b72a1a33ebf3b
main
Keisuke Kuroyanagi 2014-05-27 16:43:11 +09:00
parent 26628eeb4b
commit 301eeaa976
1 changed files with 4 additions and 3 deletions

View File

@ -30,11 +30,12 @@ import java.util.concurrent.atomic.AtomicInteger;
public class PrioritizedSerialExecutorTests extends AndroidTestCase {
private static final String TAG = PrioritizedSerialExecutorTests.class.getSimpleName();
private static final String TEST_EXECUTOR_ID = "test";
private static final int NUM_OF_TASKS = 10;
private static final int DELAY_FOR_WAITING_TASKS_MILLISECONDS = 500;
public void testExecute() {
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor();
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID);
final AtomicInteger v = new AtomicInteger(0);
for (int i = 0; i < NUM_OF_TASKS; ++i) {
executor.execute(new Runnable() {
@ -54,7 +55,7 @@ public class PrioritizedSerialExecutorTests extends AndroidTestCase {
}
public void testExecutePrioritized() {
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor();
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID);
final AtomicInteger v = new AtomicInteger(0);
for (int i = 0; i < NUM_OF_TASKS; ++i) {
executor.executePrioritized(new Runnable() {
@ -74,7 +75,7 @@ public class PrioritizedSerialExecutorTests extends AndroidTestCase {
}
public void testExecuteCombined() {
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor();
final PrioritizedSerialExecutor executor = new PrioritizedSerialExecutor(TEST_EXECUTOR_ID);
final AtomicInteger v = new AtomicInteger(0);
for (int i = 0; i < NUM_OF_TASKS; ++i) {
executor.execute(new Runnable() {