File tree 1 file changed +8
-2
lines changed
platform/jvm/capture/src/test/kotlin/io/bitdrift/capture
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -314,10 +314,16 @@ class CaptureLoggerTest {
314
314
val sdkConfigured = CaptureTestJniLibrary .nextUploadedLog()
315
315
assertThat(sdkConfigured.message).isEqualTo(" SDKConfigured" )
316
316
317
- val log = CaptureTestJniLibrary .nextUploadedLog()
317
+ var log = CaptureTestJniLibrary .nextUploadedLog()
318
+
319
+ // Sometimes a resource log is sent before the actual log, so skip it to make the tests more
320
+ // stable.
321
+ if (log.fields.containsKey(" _battery_val" )) {
322
+ log = CaptureTestJniLibrary .nextUploadedLog()
323
+ }
318
324
assertThat(log.level).isEqualTo(LogLevel .DEBUG .value)
319
- assertThat(log.message).isEqualTo(" test log" )
320
325
assertThat(log.fields).isEqualTo(expectedFields)
326
+ assertThat(log.message).isEqualTo(" test log" )
321
327
assertThat(log.sessionId).isEqualTo(" SESSION_ID" )
322
328
assertThat(log.rfc3339Timestamp).isEqualTo(" 2022-07-05T18:55:58.123Z" )
323
329
}
You can’t perform that action at this time.
0 commit comments