Skip to content

Commit

Permalink
Fix up gradle tests to work with later version and jdk11
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdan committed Oct 22, 2019
1 parent 576ba0d commit a4258f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/performance/gatling_tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

plugins {
id "com.github.lkishalmi.gatling" version "3.2.9"
id "com.github.lkishalmi.gatling" version "3.2.1"
}

apply plugin: 'eclipse'
Expand All @@ -29,7 +29,7 @@ repositories {
sourceSets {
gatling {
scala.srcDirs = ["src/gatling/scala/"]
resources.srcDirs = ["src/gatling/resoruces/"]
resources.srcDirs = ["src/gatling/resources/"]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BlockingInvokeOneActionSimulation extends Simulation {
val async = sys.env.getOrElse("ASYNC", "false").toBoolean

val actionName = "testActionForBlockingInvokeOneAction"
val actionfile = if (async) "nodeJSAsyncAction.js" else "nodeJSAction.js"
val actionfile = if (async) "/data/nodeJSAsyncAction.js" else "/data/nodeJSAction.js"

// Define scenario
val test: ScenarioBuilder = scenario(s"Invoke one ${if (async) "async" else "sync"} action blocking")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ColdBlockingInvokeSimulation extends Simulation {
// Generate the OpenWhiskProtocol
val openWhiskProtocol: OpenWhiskProtocolBuilder = openWhisk.apiHost(host)

val feeder = csv("users.csv").queue
val feeder = csv("data/users.csv").queue

// Define scenario
val test: ScenarioBuilder = scenario("Invoke one action blocking")
Expand Down Expand Up @@ -83,7 +83,7 @@ class ColdBlockingInvokeSimulation extends Simulation {
}

private def actionCode = {
val code = ClasspathPackagedResource("nodeJSAction.js", getClass.getResource("nodeJSAction.js"))
val code = ClasspathPackagedResource("nodeJSAction.js", getClass.getResource("/data/nodeJSAction.js"))
.string(StandardCharsets.UTF_8)
//Pad the code with empty space to increase the stored code size
if (codeSize > 0) code + " " * codeSize else code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ class LatencySimulation extends Simulation {
* `main` is only needed for java. This is the name of the class where the main method is located.
*/
val actions: Seq[(String, String, String, String)] = Map(
"nodejs:default" -> (ClasspathPackagedResource("nodeJSAction.js", getClass.getResource("nodeJSAction.js")).string(
StandardCharsets.UTF_8), "latencyTest_node", ""),
"python:default" -> (ClasspathPackagedResource("pythonAction.py", getClass.getResource("pythonAction.py")).string(
StandardCharsets.UTF_8), "latencyTest_python", ""),
"swift:default" -> (ClasspathPackagedResource("swiftAction.swift", getClass.getResource("swiftAction.swift"))
"nodejs:default" -> (ClasspathPackagedResource("nodeJSAction.js", getClass.getResource("/data/nodeJSAction.js"))
.string(StandardCharsets.UTF_8), "latencyTest_node", ""),
"python:default" -> (ClasspathPackagedResource("pythonAction.py", getClass.getResource("/data/pythonAction.py"))
.string(StandardCharsets.UTF_8), "latencyTest_python", ""),
"swift:default" -> (ClasspathPackagedResource("swiftAction.swift", getClass.getResource("/data/swiftAction.swift"))
.string(StandardCharsets.UTF_8), "latencyTest_swift", ""),
"java:default" -> (Base64.getEncoder.encodeToString(ClasspathPackagedResource(
"javaAction.jar",
getClass.getResource("javaAction.jar")).bytes), "latencyTest_java", "JavaAction"))
getClass.getResource("/data/javaAction.jar")).bytes), "latencyTest_java", "JavaAction"))
.filterNot(e => excludedKinds.contains(e._1))
.map {
case (kind, (code, name, main)) =>
Expand Down

0 comments on commit a4258f5

Please sign in to comment.