Skip to content

Commit

Permalink
RUM-1336 fix tests with random rum context
Browse files Browse the repository at this point in the history
  • Loading branch information
xgouchet committed Dec 11, 2023
1 parent 0db7360 commit 040cd6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ internal class RumActionScopeTest {
}
)

fakeParentContext = fakeParentContext.copy(syntheticsTestId = null, syntheticsResultId = null)

fakeEventTime = Time()
val maxLimit = Long.MAX_VALUE - fakeEventTime.timestamp
val minLimit = -fakeEventTime.timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ internal class RumContinuousActionScopeTest {
}
)

fakeParentContext = fakeParentContext.copy(syntheticsTestId = null, syntheticsResultId = null)

fakeEventTime = Time()
val maxLimit = Long.MAX_VALUE - fakeEventTime.timestamp
val minLimit = -fakeEventTime.timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ internal class RumResourceScopeTest {
source = fakeSource
)

fakeParentContext = fakeParentContext.copy(syntheticsTestId = null, syntheticsResultId = null)

fakeSourceResourceEvent = if (isValidSource) {
ResourceEvent.ResourceEventSource.fromJson(fakeSource)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ internal class RumViewScopeTest {
source = fakeSource
)

fakeParentContext = fakeParentContext.copy(syntheticsTestId = null, syntheticsResultId = null)

val fakeOffset = -forge.aLong(1000, 50000)
val fakeTimestamp = System.currentTimeMillis() + fakeOffset
val fakeNanos = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(fakeOffset)
Expand Down

0 comments on commit 040cd6a

Please sign in to comment.