Selaa lähdekoodia

Hexagon upgrade and updates test improvement (#4361)

* 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
Juanjo Aguililla 6 vuotta sitten
vanhempi
commit
135b59d218

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

@@ -1,6 +1,6 @@
 description=Hexagon web framework's benchmark
-gradleScripts=https\://raw.githubusercontent.com/hexagonkt/hexagon/0.24.7/gradle
-hexagonVersion=0.24.7
+gradleScripts=https\://raw.githubusercontent.com/hexagonkt/hexagon/0.25.0/gradle
+hexagonVersion=0.25.0
 hikariVersion=3.2.0
 jettyVersion=9.4.14.v20181114
 kotlinCoroutinesVersion=1.1.0

+ 1 - 1
frameworks/Kotlin/hexagon/src/main/kotlin/Benchmark.kt

@@ -74,7 +74,7 @@ internal val benchmarkServer: Server by lazy { Server(engine, router, SettingsMa
 private fun returnWorlds(worldsList: List<World>): List<Map<Any?, Any?>> =
     worldsList.map { it.convertToMap() - "_id" }
 
-private fun Call.getWorldsCount() = request[QUERIES_PARAM]?.toIntOrNull().let {
+private fun Call.getWorldsCount() = request.singleParameters[QUERIES_PARAM]?.toIntOrNull().let {
     when {
         it == null -> 1
         it < 1 -> 1

+ 1 - 4
frameworks/Kotlin/hexagon/src/main/kotlin/BenchmarkStorage.kt

@@ -121,16 +121,13 @@ internal class BenchmarkSqlStore(engine: String) : BenchmarkStore {
                 val rs = stmtSelect.executeQuery()
                 rs.next()
                 rs.getInt(2) // Read 'randomNumber' to comply with Test type 5, point 6
-                rs.close()
 
                 worlds += World(worldId, worldId, newRandomNumber)
 
                 stmtUpdate.setInt(1, newRandomNumber)
                 stmtUpdate.setInt(2, worldId)
-                stmtUpdate.addBatch()
+                stmtUpdate.executeUpdate()
             }
-
-            stmtUpdate.executeBatch()
         }
 
         return worlds