Skip to content

Commit

Permalink
chore: code clean up from PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-fiedler committed Nov 13, 2023
1 parent fca0492 commit fdc2539
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,14 @@ class HttpClientTest {
every { httpClient.getCurrentTimeMillis() } returns clientUploadTimeMillis

val connection = httpClient.upload()
System.currentTimeMillis()

connection.outputStream?.let {
connection.setEvents(JSONUtil.eventsToString(listOf(event)))
// Upload the payloads.
connection.close()
}

val request: RecordedRequest? = runRequest()
val body = request?.body?.readUtf8()
val result = JSONObject(body)
val request = runRequest()
val result = JSONObject(request?.body?.readUtf8())

assertEquals(apiKey, result.getString("api_key"))
assertEquals(clientUploadTimeString, result.getString("client_upload_time"))
Expand All @@ -82,17 +79,14 @@ class HttpClientTest {
every { httpClient.getCurrentTimeMillis() } returns clientUploadTimeMillis

val connection = httpClient.upload()
System.currentTimeMillis()

connection.outputStream?.let {
connection.setEvents(JSONUtil.eventsToString(listOf(event)))
// Upload the payloads.
connection.close()
}

val request: RecordedRequest? = runRequest()
val body = request?.body?.readUtf8()
val result = JSONObject(body)
val request = runRequest()
val result = JSONObject(request?.body?.readUtf8())

assertEquals(apiKey, result.getString("api_key"))
assertEquals(clientUploadTimeString, result.getString("client_upload_time"))
Expand Down

0 comments on commit fdc2539

Please sign in to comment.