diff --git a/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt b/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt index 96aace8f8..869e448d2 100644 --- a/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt +++ b/measure-android/measure/src/main/java/sh/measure/android/SessionManager.kt @@ -145,7 +145,7 @@ internal class SessionManagerImpl( processInfo.getPid(), timeProvider.currentTimeSinceEpochInMillis, needsReporting = needsReporting, - ) + ), ) } diff --git a/measure-android/measure/src/main/java/sh/measure/android/exporter/BatchCreator.kt b/measure-android/measure/src/main/java/sh/measure/android/exporter/BatchCreator.kt index 432ab76b5..59903c6cf 100644 --- a/measure-android/measure/src/main/java/sh/measure/android/exporter/BatchCreator.kt +++ b/measure-android/measure/src/main/java/sh/measure/android/exporter/BatchCreator.kt @@ -72,7 +72,7 @@ internal class BatchCreatorImpl( batchId = batchId, eventIds = eventIds, createdAt = timeProvider.currentTimeSinceEpochInMillis, - ) + ), ) if (!batchInsertionResult) { logger.log(LogLevel.Error, "Failed to insert batched event IDs") diff --git a/measure-android/measure/src/main/java/sh/measure/android/storage/Entities.kt b/measure-android/measure/src/main/java/sh/measure/android/storage/Entities.kt index 3dbf049e4..ebca91499 100644 --- a/measure-android/measure/src/main/java/sh/measure/android/storage/Entities.kt +++ b/measure-android/measure/src/main/java/sh/measure/android/storage/Entities.kt @@ -106,4 +106,4 @@ internal data class BatchEntity( val batchId: String, val eventIds: List, val createdAt: Long, -) \ No newline at end of file +) diff --git a/measure-android/measure/src/test/java/sh/measure/android/SessionManagerTest.kt b/measure-android/measure/src/test/java/sh/measure/android/SessionManagerTest.kt index 2f8353d96..3c0c07eaa 100644 --- a/measure-android/measure/src/test/java/sh/measure/android/SessionManagerTest.kt +++ b/measure-android/measure/src/test/java/sh/measure/android/SessionManagerTest.kt @@ -57,7 +57,7 @@ class SessionManagerTest { processInfo.getPid(), timeProvider.fakeCurrentTimeSinceEpochInMillis, false, - ) + ), ) } @@ -91,7 +91,7 @@ class SessionManagerTest { processInfo.getPid(), timeProvider.fakeCurrentTimeSinceEpochInMillis, false, - ) + ), ) } diff --git a/measure-android/measure/src/test/java/sh/measure/android/exporter/EventExporterTest.kt b/measure-android/measure/src/test/java/sh/measure/android/exporter/EventExporterTest.kt index 4bd411826..5f56d542b 100644 --- a/measure-android/measure/src/test/java/sh/measure/android/exporter/EventExporterTest.kt +++ b/measure-android/measure/src/test/java/sh/measure/android/exporter/EventExporterTest.kt @@ -165,8 +165,10 @@ internal class EventExporterTest { fun `deletes the batch, events and attachments on client error`() { `when`( networkClient.execute( - any(), any(), any() - ) + any(), + any(), + any(), + ), ).thenReturn(HttpResponse.Error.ClientError()) val attachment1 = AttachmentEntity("attachment1", "type", "name", "path") val attachmentPath = getPathForAttachment(attachment1) @@ -228,7 +230,7 @@ internal class EventExporterTest { batchId = batchId, eventIds = eventIds, createdAt = 12345, - ) + ), ) } } diff --git a/measure-android/measure/src/test/java/sh/measure/android/storage/DatabaseTest.kt b/measure-android/measure/src/test/java/sh/measure/android/storage/DatabaseTest.kt index b95b43f04..1d6e5d837 100644 --- a/measure-android/measure/src/test/java/sh/measure/android/storage/DatabaseTest.kt +++ b/measure-android/measure/src/test/java/sh/measure/android/storage/DatabaseTest.kt @@ -172,7 +172,7 @@ class DatabaseTest { // when val result = database.insertBatch( - BatchEntity("batch-id", listOf(event1.id, event2.id), 1234567890L) + BatchEntity("batch-id", listOf(event1.id, event2.id), 1234567890L), ) // then @@ -194,7 +194,7 @@ class DatabaseTest { "batch-id", listOf("valid-id", "event-id", "event-id"), 987654321L, - ) + ), ) queryAllEventBatches().use { assertEquals(0, it.count) @@ -213,7 +213,7 @@ class DatabaseTest { // when val result = database.insertBatch( - BatchEntity("batch-id", listOf(event1.id, eventNotInEventsTable.id), 1234567890L) + BatchEntity("batch-id", listOf(event1.id, eventNotInEventsTable.id), 1234567890L), ) assertEquals(false, result) queryAllEventBatches().use { @@ -233,7 +233,7 @@ class DatabaseTest { database.insertEvent(event2) database.insertEvent(batchedEvent) database.insertBatch( - TestData.getEventBatchEntity(batchId = "batch-id", eventIds = listOf(batchedEvent.id)) + TestData.getEventBatchEntity(batchId = "batch-id", eventIds = listOf(batchedEvent.id)), ) // when @@ -251,14 +251,14 @@ class DatabaseTest { database.insertSession( TestData.getSessionEntity( id = "session-id-1", - needsReporting = true - ) + needsReporting = true, + ), ) database.insertSession( TestData.getSessionEntity( id = "session-id-2", - needsReporting = false - ) + needsReporting = false, + ), ) database.insertEvent(event1) database.insertEvent(event2) @@ -276,14 +276,14 @@ class DatabaseTest { database.insertSession( TestData.getSessionEntity( id = "session-id-1", - needsReporting = true - ) + needsReporting = true, + ), ) database.insertSession( TestData.getSessionEntity( id = "session-id-2", - needsReporting = false - ) + needsReporting = false, + ), ) database.insertEvent(event1) database.insertEvent(event2) @@ -320,14 +320,14 @@ class DatabaseTest { database.insertSession( TestData.getSessionEntity( id = "session-id-1", - needsReporting = false - ) + needsReporting = false, + ), ) database.insertSession( TestData.getSessionEntity( id = "session-id-2", - needsReporting = false - ) + needsReporting = false, + ), ) database.insertEvent(hotLaunchEvent) database.insertEvent(coldLaunchEvent) @@ -360,14 +360,14 @@ class DatabaseTest { database.insertSession( TestData.getSessionEntity( id = "session-id-1", - needsReporting = true - ) + needsReporting = true, + ), ) database.insertSession( TestData.getSessionEntity( id = "session-id-2", - needsReporting = true - ) + needsReporting = true, + ), ) database.insertEvent(event1) database.insertEvent(event2) @@ -456,7 +456,7 @@ class DatabaseTest { eventWithAttachment.id, eventWithMultipleAttachments.id, eventWithDifferentSession.id, - ) + ), ) // then @@ -564,7 +564,6 @@ class DatabaseTest { assertNull(sessionId) } - @Test fun `getOldestSession returns null when no session exists`() { // when