Skip to content

Commit 8b1024e

Browse files
committed
Add akka-http test
1 parent a5c6593 commit 8b1024e

File tree

6 files changed

+56
-0
lines changed

6 files changed

+56
-0
lines changed

akka-http/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.iml
2+
.idea/
3+
*.iml
4+
target/
5+
dependency-reduced-pom.xml

akka-http/build.sbt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//import sbt.Keys._
2+
import sbt._
3+
4+
5+
name := "akka-http-helloworld"
6+
7+
version := "1.0"
8+
9+
scalaVersion := "2.11.5"
10+
11+
libraryDependencies ++= Seq(
12+
"com.typesafe.akka" %% "akka-http-experimental" % "1.0",
13+
"com.typesafe.akka" %% "akka-http-spray-json-experimental" % "1.0",
14+
"com.typesafe.akka" %%"akka-http-testkit-experimental" % "1.0",
15+
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
16+
)

akka-http/project/build.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version = 0.13.6

akka-http/project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
logLevel := Level.Warn
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.madhukaraphatak.akkahttp
2+
3+
4+
import akka.actor.ActorSystem
5+
import akka.stream.ActorMaterializer
6+
import akka.http.scaladsl.Http
7+
import akka.http.scaladsl.server.Directives._
8+
9+
/**
10+
* Created by madhu on 8/11/15.
11+
*/
12+
object AkkaHttpHelloWorld {
13+
14+
def main(args: Array[String]) {
15+
16+
implicit val actorSystem = ActorSystem("system")
17+
implicit val actorMaterializer = ActorMaterializer()
18+
19+
20+
val route =
21+
pathSingleSlash {
22+
get {
23+
complete {
24+
"Hello world"
25+
}
26+
}
27+
}
28+
Http().bindAndHandle(route,"localhost",8080)
29+
30+
println("server started at 8080")
31+
}
32+
}

pipeline.lua

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ init = function(args)
1010
end
1111

1212
request = function()
13+
wrk.headers["J-Tenant-Id"] = "1007"
1314
return req
1415
end

0 commit comments

Comments
 (0)