Skip to content

Commit

Permalink
fix integration test flake (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowp authored Dec 8, 2024
1 parent ec204bc commit 31eb8c1
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,16 @@ class CaptureLoggerTest {
val sdkConfigured = CaptureTestJniLibrary.nextUploadedLog()
assertThat(sdkConfigured.message).isEqualTo("SDKConfigured")

val log = CaptureTestJniLibrary.nextUploadedLog()
var log = CaptureTestJniLibrary.nextUploadedLog()

// Sometimes a resource log is sent before the actual log, so skip it to make the tests more
// stable.
if (log.fields.containsKey("_battery_val")) {
log = CaptureTestJniLibrary.nextUploadedLog()
}
assertThat(log.level).isEqualTo(LogLevel.DEBUG.value)
assertThat(log.message).isEqualTo("test log")
assertThat(log.fields).isEqualTo(expectedFields)
assertThat(log.message).isEqualTo("test log")
assertThat(log.sessionId).isEqualTo("SESSION_ID")
assertThat(log.rfc3339Timestamp).isEqualTo("2022-07-05T18:55:58.123Z")
}
Expand Down

0 comments on commit 31eb8c1

Please sign in to comment.