From 962e4a963843932420f2e20ea458b0b08d92d53a Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 3 Jul 2012 11:28:24 +0200 Subject: [PATCH 1/2] Document how to boot up an Akka/play-mini application, see #2272 --- akka-docs/modules/http.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/akka-docs/modules/http.rst b/akka-docs/modules/http.rst index b0f54948d3..9a5f1f3a47 100644 --- a/akka-docs/modules/http.rst +++ b/akka-docs/modules/http.rst @@ -12,11 +12,19 @@ service applications that integrates with Akka. It provides a REST API on top of Getting started --------------- -First you must make your application aware of play-mini. -In SBT you just have to add the following to your ``libraryDependencies``:: +Easiest way to get started with `Play2 Mini `_ is to use the +G8 project templates, as described in the `Play2 Mini Documentation `_. + +If you already have an Akka project and want to add Play2 Mini, you must first add the following to +your ``libraryDependencies``:: libraryDependencies += "com.typesafe" %% "play-mini" % "" +In case you need to start Play2 Mini programatically you can use:: + + play.core.server.NettyServer.main(Array()) + + Akka Mist ========= From b5eea69ebb2bc8fae310b8959584141a3c1e3b24 Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Tue, 3 Jul 2012 11:43:59 +0200 Subject: [PATCH 2/2] Fixing OSGi tests by making them serially executed. --- .../akka/osgi/aries/blueprint/NamespaceHandlerTest.scala | 1 - akka-osgi/src/test/scala/akka/osgi/PojoSRTestSupport.scala | 6 +++--- project/AkkaBuild.scala | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/akka-osgi-aries/src/test/scala/akka/osgi/aries/blueprint/NamespaceHandlerTest.scala b/akka-osgi-aries/src/test/scala/akka/osgi/aries/blueprint/NamespaceHandlerTest.scala index 3bc32c6141..cfe9ce2e94 100644 --- a/akka-osgi-aries/src/test/scala/akka/osgi/aries/blueprint/NamespaceHandlerTest.scala +++ b/akka-osgi-aries/src/test/scala/akka/osgi/aries/blueprint/NamespaceHandlerTest.scala @@ -63,7 +63,6 @@ class ConfigNamespaceHandlerTest extends WordSpec with MustMatchers with PojoSRT "set up ActorSystem when bundle starts" in { val system = serviceForType[ActorSystem] system must not be (null) - system.settings.config.getString("some.config.key") must be("value") } diff --git a/akka-osgi/src/test/scala/akka/osgi/PojoSRTestSupport.scala b/akka-osgi/src/test/scala/akka/osgi/PojoSRTestSupport.scala index b19a90bf21..df96601d79 100644 --- a/akka-osgi/src/test/scala/akka/osgi/PojoSRTestSupport.scala +++ b/akka-osgi/src/test/scala/akka/osgi/PojoSRTestSupport.scala @@ -11,8 +11,8 @@ import java.net.URL import java.util.jar.JarInputStream import java.io.{ FileInputStream, FileOutputStream, File } -import java.util.{ Date, ServiceLoader, HashMap } import org.scalatest.{ BeforeAndAfterAll, Suite } +import java.util.{ UUID, Date, ServiceLoader, HashMap } /** * Trait that provides support for building akka-osgi tests using PojoSR @@ -26,11 +26,11 @@ 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. */ - val testBundles: Seq[BundleDescriptor] + def testBundles: Seq[BundleDescriptor] lazy val context: BundleContext = { val config = new HashMap[String, AnyRef]() - System.setProperty("org.osgi.framework.storage", "target/akka-osgi/" + System.currentTimeMillis) + System.setProperty("org.osgi.framework.storage", "target/akka-osgi/" + UUID.randomUUID().toString) val bundles = new ClasspathScanner().scanForBundles() bundles.addAll(testBundles) diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 7b83364ed0..73546ca85f 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -222,7 +222,8 @@ object AkkaBuild extends Build { base = file("akka-osgi"), dependencies = Seq(actor), settings = defaultSettings ++ OSGi.osgi ++ Seq( - libraryDependencies ++= Dependencies.osgi + libraryDependencies ++= Dependencies.osgi, + parallelExecution in Test := false ) ) @@ -231,7 +232,8 @@ object AkkaBuild extends Build { base = file("akka-osgi-aries"), dependencies = Seq(osgi % "compile;test->test"), settings = defaultSettings ++ OSGi.osgiAries ++ Seq( - libraryDependencies ++= Dependencies.osgiAries + libraryDependencies ++= Dependencies.osgiAries, + parallelExecution in Test := false ) )