Switching to immutable.Seq instead of Seq

This commit is contained in:
Viktor Klang 2012-10-30 15:08:41 +01:00
parent 2866ecfa85
commit 8f131c680f
65 changed files with 375 additions and 350 deletions

View file

@ -10,6 +10,7 @@ import akka.actor.ActorSystem
import akka.pattern.ask
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.collection.immutable
import akka.util.Timeout
import de.kalpatec.pojosr.framework.launch.BundleDescriptor
import test.{ RuntimeNameActorSystemActivator, TestActivators, PingPongActorSystemActivator }
@ -32,7 +33,7 @@ class PingPongActorSystemActivatorTest extends WordSpec with MustMatchers with P
import ActorSystemActivatorTest._
val testBundles: Seq[BundleDescriptor] = buildTestBundles(Seq(
val testBundles: immutable.Seq[BundleDescriptor] = buildTestBundles(List(
bundle(TEST_BUNDLE_NAME).withActivator(classOf[PingPongActorSystemActivator])))
"PingPongActorSystemActivator" must {
@ -65,7 +66,8 @@ class RuntimeNameActorSystemActivatorTest extends WordSpec with MustMatchers wit
import ActorSystemActivatorTest._
val testBundles: Seq[BundleDescriptor] = buildTestBundles(Seq(bundle(TEST_BUNDLE_NAME).withActivator(classOf[RuntimeNameActorSystemActivator])))
val testBundles: immutable.Seq[BundleDescriptor] =
buildTestBundles(List(bundle(TEST_BUNDLE_NAME).withActivator(classOf[RuntimeNameActorSystemActivator])))
"RuntimeNameActorSystemActivator" must {

View file

@ -17,7 +17,7 @@ import java.io._
import org.scalatest.{ BeforeAndAfterAll, Suite }
import java.util.{ UUID, Date, ServiceLoader, HashMap }
import scala.reflect.ClassTag
import scala.Some
import scala.collection.immutable
/**
* Trait that provides support for building akka-osgi tests using PojoSR
@ -31,7 +31,7 @@ trait PojoSRTestSupport extends Suite with BeforeAndAfterAll {
* All bundles being found on the test classpath are automatically installed and started in the PojoSR runtime.
* Implement this to define the extra bundles that should be available for testing.
*/
def testBundles: Seq[BundleDescriptor]
def testBundles: immutable.Seq[BundleDescriptor]
val bufferedLoadingErrors = new ByteArrayOutputStream()
@ -82,15 +82,11 @@ trait PojoSRTestSupport extends Suite with BeforeAndAfterAll {
}
}
protected def buildTestBundles(builders: Seq[BundleDescriptorBuilder]): Seq[BundleDescriptor] = builders map (_.build)
protected def buildTestBundles(builders: immutable.Seq[BundleDescriptorBuilder]): immutable.Seq[BundleDescriptor] =
builders map (_.build)
def filterErrors()(block: Unit): Unit = {
try {
block
} catch {
case e: Throwable System.err.write(bufferedLoadingErrors.toByteArray); throw e
}
}
def filterErrors()(block: Unit): Unit =
try block catch { case e: Throwable System.err.write(bufferedLoadingErrors.toByteArray); throw e }
}
object PojoSRTestSupport {