Skip to content

Commit

Permalink
NH-37575: move benchmarking to Push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Jul 3, 2024
1 parent bc2026e commit 3963c0a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions smoke-tests/netty-test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.jsonPrimitive
import com.jayway.jsonpath.JsonPath
import java.net.URI
import java.net.http.HttpClient
import java.net.http.HttpRequest
Expand Down Expand Up @@ -31,7 +28,7 @@ plugins {

buildscript {
dependencies {
classpath("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
classpath("com.jayway.jsonpath:json-path:2.9.0")
}
}

Expand Down Expand Up @@ -66,14 +63,8 @@ fun getAgentUrlFromGitRelease(): String {
.GET().build()

val httpResponse = httpClient.send(request, HttpResponse.BodyHandlers.ofString())
val payload = Json.decodeFromString<JsonArray>(httpResponse.body())

// The latest release is assumed to be the first item in the list
val latest = payload[0] as JsonObject
val assets = latest["assets"] as JsonArray
val asset = assets[0] as JsonObject
println(asset)
return asset["url"]!!.jsonPrimitive.content
return JsonPath.parse(httpResponse.body()).read("$[0].assets[0].url")
}

application {
Expand Down

0 comments on commit 3963c0a

Please sign in to comment.