Skip to content

Commit

Permalink
[RFR-430] Fix start timestamp type (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 authored May 2, 2023
1 parent 905736c commit 7084f83
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gradle.properties
**/*.swp

# Cyface Temporary Files
**/file-uploads
**/uploadFolder
**/.vertx
**/conf.json
**/*.log
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ extra["vertxVersion"] = "4.3.6"
// https://github.com/vert-x3/vertx-mongo-client/issues/291
extra["mongoDriverVersion"] = "4.8.0"
extra["micrometerVersion"] = "1.10.6"
extra["slf4jVersion"] = "2.0.7"
extra["commonsLangVersion"] = "3.12.0"
extra["logbackVersion"] = "1.4.6"
extra["cyfaceApiVersion"] = "2.1.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ data class RequestMetaData(
*/
fun geoJson(): JsonObject {
val ret = JsonObject()
ret.put("timestamp", timestamp.toString())
ret.put("timestamp", timestamp)
val geometry = JsonObject()
.put("type", "Point")
.put("coordinates", JsonArray().add(longitude).add(latitude))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ class GridFSStorageTest {
val metadata = firstValue.metadata
assertThat(metadata.getString("deviceId"), equalTo(expectedMetaData.getString("deviceId")))
assertThat(metadata.getString("measurementId"), equalTo(expectedMetaData.getString("measurementId")))
// Ensure timestamp is stored as long [RFR-430]
assertThat(metadata.getJsonObject("start").getLong("timestamp"), equalTo(startLocation.timestamp))
}
}

Expand Down

0 comments on commit 7084f83

Please sign in to comment.