From 152cf09b068bbb6f55d7335a429cb7bc46e833bd Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 29 Dec 2008 16:09:52 +0000 Subject: Merge r720913 change to 1.x so we can start looking at a pluggable impl for the geronimo integration work and to remove the dependency from the compact distro git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@729926 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/java/org/apache/tuscany/sca/core/work/FailingWork.java | 7 +++++-- .../tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java | 4 ++-- .../java/org/apache/tuscany/sca/core/work/TestWorkListener.java | 9 +++------ .../java/org/apache/tuscany/sca/core/work/TimeDelayWork.java | 5 ++--- 4 files changed, 12 insertions(+), 13 deletions(-) (limited to 'branches/sca-java-1.x/modules/core/src/test') diff --git a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java b/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java index 3184c3de92..c69a1908e8 100644 --- a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/FailingWork.java +++ b/branches/sca-java-1.x/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/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java b/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java index 225f23cb93..185394d7e8 100644 --- a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/Jsr237WorkSchedulerTestCase.java +++ b/branches/sca-java-1.x/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/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java b/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java index ba32a92c18..58a1b87c48 100644 --- a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TestWorkListener.java +++ b/branches/sca-java-1.x/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 workExceptions = Collections.synchronizedList(new ArrayList()); + private List workExceptions = Collections.synchronizedList(new ArrayList()); /** * {@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 getWorkExceptions() { + public List getWorkExceptions() { return Collections.unmodifiableList(workExceptions); } } diff --git a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java b/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java index 3b30d86f14..6c10057046 100644 --- a/branches/sca-java-1.x/modules/core/src/test/java/org/apache/tuscany/sca/core/work/TimeDelayWork.java +++ b/branches/sca-java-1.x/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; } -- cgit v1.2.3