Examples of runTask()


Examples of org.apache.roller.weblogger.planet.tasks.SyncWebsitesTask.runTask()

            PlanetManager planet = PlanetFactory.getPlanet().getPlanetManager();
           
            // run sync task to fill aggregator with websites created by super
            SyncWebsitesTask syncTask = new SyncWebsitesTask();
            syncTask.init();
            syncTask.runTask();
           
            Planet planetObject = planet.getPlanetById("zzz_default_planet_zzz");
            assertNotNull(planetObject);
            PlanetGroup group = planet.getGroup(planetObject, "all");
            assertEquals(1, group.getSubscriptions().size());
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   public void testBasic() throws Exception
   {
      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(BASIC, "test"));
         completed.wait(1);
         HashSet expected = makeExpected(new Object[] {"test"});
         assertEquals(expected, accepted.tasks);
         assertEquals(expected, started.tasks);
         assertEquals(expected, completed.tasks);
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   public void testMultipleBasic() throws Exception
   {
      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(BASIC, "test1"));
         pool.runTask(new TestTask(BASIC, "test2"));
         pool.runTask(new TestTask(BASIC, "test3"));
         completed.wait(3);
         HashSet expected = makeExpected(new Object[] {"test1", "test2", "test3"});
         assertEquals(expected, accepted.tasks);
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   {
      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(BASIC, "test1"));
         pool.runTask(new TestTask(BASIC, "test2"));
         pool.runTask(new TestTask(BASIC, "test3"));
         completed.wait(3);
         HashSet expected = makeExpected(new Object[] {"test1", "test2", "test3"});
         assertEquals(expected, accepted.tasks);
         assertEquals(expected, started.tasks);
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(BASIC, "test1"));
         pool.runTask(new TestTask(BASIC, "test2"));
         pool.runTask(new TestTask(BASIC, "test3"));
         completed.wait(3);
         HashSet expected = makeExpected(new Object[] {"test1", "test2", "test3"});
         assertEquals(expected, accepted.tasks);
         assertEquals(expected, started.tasks);
         assertEquals(expected, completed.tasks);
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   {
      BasicThreadPool pool = new BasicThreadPool();
      pool.setMaximumPoolSize(1);
      try
      {
         pool.runTask(new TestTask(BASIC, "test1"));
         completed.wait(1);
         pool.runTask(new TestTask(BASIC, "test2"));
         completed.wait(2);
         assertEquals(threadNames.get("test1"), threadNames.get("test2"));
      }
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

      pool.setMaximumPoolSize(1);
      try
      {
         pool.runTask(new TestTask(BASIC, "test1"));
         completed.wait(1);
         pool.runTask(new TestTask(BASIC, "test2"));
         completed.wait(2);
         assertEquals(threadNames.get("test1"), threadNames.get("test2"));
      }
      finally
      {
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   public void testMultiplePooling() throws Exception
   {
      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(HOLD_START, "test1"));
         started.wait(1);
         pool.runTask(new TestTask(BASIC, "test2"));
         completed.wait(1);
         started.release("test1");
         completed.wait(2);
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

      BasicThreadPool pool = new BasicThreadPool();
      try
      {
         pool.runTask(new TestTask(HOLD_START, "test1"));
         started.wait(1);
         pool.runTask(new TestTask(BASIC, "test2"));
         completed.wait(1);
         started.release("test1");
         completed.wait(2);
         assertTrue("Shouldn't run on the same thread", threadNames.get("test1").equals(threadNames.get("test2")) == false);
      }
View Full Code Here

Examples of org.jboss.util.threadpool.BasicThreadPool.runTask()

   {
      BasicThreadPool pool = new BasicThreadPool();
      pool.setMaximumPoolSize(1);
      try
      {
         pool.runTask(new TestTask(HOLD_START, "test1"));
         started.wait(1);
         pool.runTask(new TestTask(BASIC, "test2"));
         Thread.sleep(1000);
         assertEquals(0, completed.tasks.size());
         started.release("test1");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.