All old tests now run with netty server. (but jetty is disabled - need to make it selectable)
--- a/src/main/scala/netty/ReadWriteWebNetty.scala Sun Oct 23 19:52:36 2011 +0200
+++ b/src/main/scala/netty/ReadWriteWebNetty.scala Sun Oct 23 21:39:07 2011 +0200
@@ -54,7 +54,7 @@
baseURL.value.get,
lang=rdfLanguage.value getOrElse RDFXML)(mode.value getOrElse ResourcesDontExistByDefault)
-// val app = new ReadWriteWeb(filesystem, new RDFAuthZ(webCache,filesystem))
+// val app = new ReadWriteWeb(filesystem, new RDFAuthZ(webCache,filesystem))
val rww = new cycle.Plan with cycle.ThreadPool with ServerErrorResponse with ReadWriteWeb[ReceivedMessage,HttpResponse]{
val rm = filesystem
def manif = manifest[ReceivedMessage]
--- a/src/test/scala/util/specs.scala Sun Oct 23 19:52:36 2011 +0200
+++ b/src/test/scala/util/specs.scala Sun Oct 23 21:39:07 2011 +0200
@@ -2,27 +2,18 @@
import org.w3.readwriteweb._
-import auth.RDFAuthZ
import org.specs._
-import java.net.URL
-import unfiltered.response._
-import unfiltered.request._
import dispatch._
import java.io._
-import com.codecommit.antixml._
import grizzled.file.GrizzledFile._
-import com.hp.hpl.jena.rdf.model._
-import com.hp.hpl.jena.query._
-import com.hp.hpl.jena.update._
-
-import org.w3.readwriteweb.util._
import org.w3.readwriteweb.utiltest._
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import unfiltered.filter.Planify
+import unfiltered.netty.{ReceivedMessage, ServerErrorResponse, cycle}
-trait ResourceManaged extends Specification with unfiltered.spec.jetty.Served {
+trait JettyResourceManaged extends Specification with unfiltered.spec.jetty.Served {
def resourceManager: ResourceManager
@@ -35,6 +26,22 @@
}
+trait ResourceManaged extends Specification with unfiltered.spec.netty.Served {
+ import org.jboss.netty.handler.codec.http._
+
+ def resourceManager: ResourceManager
+
+ val rww = new cycle.Plan with cycle.ThreadPool with ServerErrorResponse with ReadWriteWeb[ReceivedMessage,HttpResponse] {
+ val rm = resourceManager
+ def manif = manifest[ReceivedMessage]
+ // override val authz = new RDFAuthZ[ReceivedMessage,HttpResponse](webCache,filesystem)
+ }
+
+ def setup = { _.plan(rww) }
+
+}
+
+
trait FilesystemBased extends ResourceManaged {
lazy val mode: RWWMode = ResourcesDontExistByDefault