Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Aug 30, 2024
1 parent 21a955c commit 17c2b5d
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions posthog/src/test/java/com/posthog/PostHogTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1107,32 +1107,12 @@ internal class PostHogTest {

val sut = getSut(url.toString(), preloadFeatureFlags = false)

sut.capture(
EVENT,
DISTINCT_ID,
props,
userProperties = userProps,
userPropertiesSetOnce = userPropsOnce,
groups = groups,
)

queueExecutor.awaitExecution()

assertEquals(1, http.requestCount)

var request = http.takeRequest()
val content = request.body.unGzip()
val batch = serializer.deserialize<PostHogBatchEvent>(content.reader())

val theEvent = batch.batch.first()
assertNotNull(theEvent)

sut.reset()

featureFlagsExecutor.shutdownAndAwaitTermination()

request = http.takeRequest()
assertEquals(2, http.requestCount)
val request = http.takeRequest()
assertEquals(1, http.requestCount)
assertEquals("/decide/?v=3", request.path)

sut.close()
Expand Down

0 comments on commit 17c2b5d

Please sign in to comment.