Browse Source

Hexagon update framework version (#4446)

* Update Hexagon benchmark

* Update Hexagon benchmark

* Remove features not used in tests

* Remove MySql storage

* Enable Resin test

* Merge Hexagon config

* Remove batch for updates benchmark

* Fix compilation problem

* Update Kotlin version

* Update dependencies and tools

* Move source files to their package directories

* Update Gradle version
Juanjo Aguililla 6 years ago
parent
commit
4fb71d242a

+ 2 - 2
frameworks/Kotlin/hexagon/README.md

@@ -6,8 +6,8 @@ development platforms. The test utilizes Hexagon routes, serialization and datab
 
 
 ## Tests
 ## Tests
 
 
-* [Hexagon Web](/src/main/kotlin/Benchmark.kt)
-* [Hexagon Storage](/src/main/kotlin/BenchmarkStorage.kt)
+* [Hexagon Web](/src/main/kotlin/com/hexagonkt/Benchmark.kt)
+* [Hexagon Storage](/src/main/kotlin/com/hexagonkt/BenchmarkStorage.kt)
 
 
 ## Infrastructure Software Versions
 ## Infrastructure Software Versions
 
 

+ 1 - 1
frameworks/Kotlin/hexagon/build.gradle

@@ -1,6 +1,6 @@
 
 
 plugins {
 plugins {
-    id "org.jetbrains.kotlin.jvm" version "1.3.11"
+    id "org.jetbrains.kotlin.jvm" version "1.3.21"
 }
 }
 
 
 apply(from: "$gradleScripts/kotlin.gradle")
 apply(from: "$gradleScripts/kotlin.gradle")

+ 5 - 5
frameworks/Kotlin/hexagon/gradle.properties

@@ -1,10 +1,10 @@
 description=Hexagon web framework's benchmark
 description=Hexagon web framework's benchmark
-gradleScripts=https\://raw.githubusercontent.com/hexagonkt/hexagon/0.25.0/gradle
-hexagonVersion=0.25.0
-hikariVersion=3.2.0
+gradleScripts=https\://raw.githubusercontent.com/hexagonkt/hexagon/0.25.3/gradle
+hexagonVersion=0.25.3
+hikariVersion=3.3.1
 jettyVersion=9.4.14.v20181114
 jettyVersion=9.4.14.v20181114
-kotlinCoroutinesVersion=1.1.0
-kotlinVersion=1.3.11
+kotlinCoroutinesVersion=1.1.1
+kotlinVersion=1.3.21
 logbackVersion=1.2.3
 logbackVersion=1.2.3
 postgresqlVersion=42.2.5.jre7
 postgresqlVersion=42.2.5.jre7
 testngVersion=6.14.3
 testngVersion=6.14.3

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-jetty-postgresql.dockerfile

@@ -2,7 +2,7 @@
 #
 #
 # BUILD
 # BUILD
 #
 #
-FROM gradle:5.0.0-jdk11 AS gradle_build
+FROM gradle:5.2.1-jdk11 AS gradle_build
 USER root
 USER root
 WORKDIR /hexagon
 WORKDIR /hexagon
 
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-resin-mongodb.dockerfile

@@ -2,7 +2,7 @@
 #
 #
 # BUILD
 # BUILD
 #
 #
-FROM gradle:5.0.0-jdk11 AS gradle_build
+FROM gradle:5.2.1-jdk11 AS gradle_build
 USER root
 USER root
 WORKDIR /hexagon
 WORKDIR /hexagon
 
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon-resin-postgresql.dockerfile

@@ -2,7 +2,7 @@
 #
 #
 # BUILD
 # BUILD
 #
 #
-FROM gradle:5.0.0-jdk11 AS gradle_build
+FROM gradle:5.2.1-jdk11 AS gradle_build
 USER root
 USER root
 WORKDIR /hexagon
 WORKDIR /hexagon
 
 

+ 1 - 1
frameworks/Kotlin/hexagon/hexagon.dockerfile

@@ -2,7 +2,7 @@
 #
 #
 # BUILD
 # BUILD
 #
 #
-FROM gradle:5.0.0-jdk11 AS gradle_build
+FROM gradle:5.2.1-jdk11 AS gradle_build
 USER root
 USER root
 WORKDIR /hexagon
 WORKDIR /hexagon
 
 

+ 3 - 3
frameworks/Kotlin/hexagon/src/main/kotlin/Benchmark.kt → frameworks/Kotlin/hexagon/src/main/kotlin/com/hexagonkt/Benchmark.kt

@@ -47,8 +47,8 @@ private val engine by lazy {
 private val router: Router by lazy {
 private val router: Router by lazy {
     Router {
     Router {
         before {
         before {
-            response.addHeader("Server", "Servlet/3.1")
-            response.addHeader("Transfer-Encoding", "chunked")
+            response.setHeader("Server", "Servlet/3.1")
+            response.setHeader("Transfer-Encoding", "chunked")
         }
         }
 
 
         get("/plaintext") { ok(TEXT_MESSAGE, "text/plain") }
         get("/plaintext") { ok(TEXT_MESSAGE, "text/plain") }
@@ -74,7 +74,7 @@ internal val benchmarkServer: Server by lazy { Server(engine, router, SettingsMa
 private fun returnWorlds(worldsList: List<World>): List<Map<Any?, Any?>> =
 private fun returnWorlds(worldsList: List<World>): List<Map<Any?, Any?>> =
     worldsList.map { it.convertToMap() - "_id" }
     worldsList.map { it.convertToMap() - "_id" }
 
 
-private fun Call.getWorldsCount() = request.singleParameters[QUERIES_PARAM]?.toIntOrNull().let {
+private fun Call.getWorldsCount() = parameters[QUERIES_PARAM]?.firstOrNull()?.toIntOrNull().let {
     when {
     when {
         it == null -> 1
         it == null -> 1
         it < 1 -> 1
         it < 1 -> 1

+ 0 - 0
frameworks/Kotlin/hexagon/src/main/kotlin/BenchmarkStorage.kt → frameworks/Kotlin/hexagon/src/main/kotlin/com/hexagonkt/BenchmarkStorage.kt


+ 0 - 0
frameworks/Kotlin/hexagon/src/test/kotlin/BenchmarkTest.kt → frameworks/Kotlin/hexagon/src/test/kotlin/com/hexagonkt/BenchmarkTest.kt