From a995ec231e5175ef39b2141cbae6d4c43d25e32c Mon Sep 17 00:00:00 2001 From: Nikita Ogorodnikov Date: Wed, 28 Dec 2022 16:17:00 +0100 Subject: [PATCH] Fix flaky WireframeUtils test --- .../android/sessionreplay/processor/WireframeUtilsTest.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/library/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/processor/WireframeUtilsTest.kt b/library/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/processor/WireframeUtilsTest.kt index 56fb2b5d53..3126df7759 100644 --- a/library/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/processor/WireframeUtilsTest.kt +++ b/library/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/processor/WireframeUtilsTest.kt @@ -22,7 +22,6 @@ import org.mockito.junit.jupiter.MockitoExtension import org.mockito.junit.jupiter.MockitoSettings import org.mockito.quality.Strictness import kotlin.math.abs -import kotlin.math.max @Extensions( ExtendWith(MockitoExtension::class), @@ -178,7 +177,7 @@ internal class WireframeUtilsTest { bottom = fakeExpectedClipBottom ) - val fakeRandomParents: List = forge.aList { + val fakeRandomParents: List = forge.aList { val aClipLeft = forge.aLong(min = -100, max = fakeExpectedClipLeft) val aClipTop = forge.aLong(min = -100, max = fakeExpectedClipTop) val aClipRight = forge.aLong(min = -100, max = fakeExpectedClipRight) - aClipLeft @@ -737,9 +736,7 @@ internal class WireframeUtilsTest { private fun Forge.forgeNonTransparentShapeStyle(): MobileSegment.ShapeStyle { return MobileSegment.ShapeStyle( - backgroundColor = aNullable { - aStringMatching("#[0-9A-F]{6}FF") - }, + backgroundColor = aStringMatching("#[0-9A-F]{6}FF"), opacity = 1f, cornerRadius = aPositiveLong() )