diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-26 16:38:18 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-26 16:38:18 +0000 |
commit | 89d18e43d1c0b9de71c8b6800ce44dc8d36df1b6 (patch) | |
tree | 790f1a17ea260adfb6f8e4ffbacb964625d4e95f /java/sca/modules/core/src/test | |
parent | aecff162c1bd14ebb5eee14f9d46eacd37c29996 (diff) |
Remove core dependency on commonj workmanager
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@720913 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core/src/test')
4 files changed, 12 insertions, 13 deletions
diff --git a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java index 3184c3de92..c69a1908e8 100644 --- a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java +++ b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java @@ -18,14 +18,17 @@ */ package org.apache.tuscany.sca.core.work; -import commonj.work.Work; /** * Simple Work item that will throw an exception * * @version $Rev$ $Date$ */ -public class FailingWork implements Work { +public class FailingWork extends Work { + + public FailingWork() { + super(null); + } /** * {@inheritDoc} diff --git a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java index 225f23cb93..185394d7e8 100644 --- a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java +++ b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java @@ -38,14 +38,14 @@ public class Jsr237WorkSchedulerTestCase { /** * This is the shared instance of the ThreadPoolWorkManager used by the tests */ - private static Jsr237WorkScheduler workSchedular = null; + private static DefaultWorkScheduler workSchedular = null; /** * Setup the Jsr237WorkScheduler */ @BeforeClass public static void setup() { - workSchedular = new Jsr237WorkScheduler(); + workSchedular = new DefaultWorkScheduler(); } /** diff --git a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java index ba32a92c18..58a1b87c48 100644 --- a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java +++ b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java @@ -23,12 +23,9 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import org.apache.tuscany.sca.work.WorkSchedulerException; import org.junit.Assert; -import commonj.work.WorkEvent; -import commonj.work.WorkException; -import commonj.work.WorkListener; - /** * A simple WorkListener that tracks invocations to it. * @@ -59,7 +56,7 @@ public class TestWorkListener implements WorkListener { /** * List of all exceptions thrown by Work items */ - private List<WorkException> workExceptions = Collections.synchronizedList(new ArrayList<WorkException>()); + private List<WorkSchedulerException> workExceptions = Collections.synchronizedList(new ArrayList<WorkSchedulerException>()); /** * {@inheritDoc} @@ -150,7 +147,7 @@ public class TestWorkListener implements WorkListener { * * @return A List of all exceptions that are thrown by the Work items */ - public List<WorkException> getWorkExceptions() { + public List<WorkSchedulerException> getWorkExceptions() { return Collections.unmodifiableList(workExceptions); } } diff --git a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java index 3b30d86f14..6c10057046 100644 --- a/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java +++ b/java/sca/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java @@ -20,15 +20,13 @@ package org.apache.tuscany.sca.core.work; import java.util.concurrent.atomic.AtomicInteger; -import commonj.work.Work; - /** * Simple Work item that will sleep in the run() method for the specified * period of time * * @version $Rev$ $Date$ */ -public class TimeDelayWork implements Work { +public class TimeDelayWork extends Work { /** * Count of completed run() method calls @@ -46,6 +44,7 @@ public class TimeDelayWork implements Work { * @param sleepTime The amount of time to sleep (in milliseconds) in the run() method */ public TimeDelayWork(long sleepTime) { + super(null); this.sleepTime = sleepTime; } |