JobSchedulerStoreTest - fix test, don't allow jobs to start scheduling on slow machines

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1327457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2012-04-18 11:47:25 +00:00
parent 9287816fec
commit 9706f654a4
1 changed files with 6 additions and 5 deletions

View File

@ -16,13 +16,14 @@
*/
package org.apache.activemq.broker.scheduler;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
import org.apache.activemq.util.IOHelper;
import org.apache.kahadb.util.ByteSequence;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class JobSchedulerStoreTest extends TestCase {
public void testRestart() throws Exception {
@ -40,9 +41,9 @@ public class JobSchedulerStoreTest extends TestCase {
}
JobScheduler js = store.getJobScheduler("test");
int count = 0;
long startTime = 10000;
long startTime = 10 * 60 * 1000; long period = startTime;
for (ByteSequence job:list) {
js.schedule("id:"+(count++), job,"",startTime,10000,-1);
js.schedule("id:"+(count++), job, "", startTime, period, -1);
}
List<Job>test = js.getAllJobs();
assertEquals(list.size(),test.size());