@@ -1122,29 +1122,29 @@ class AsyncAnalyticsTests {
1122
1122
assertEquals(expectedGroupId, e.groupId)
1123
1123
}
1124
1124
}
1125
- //
1126
- // @Test
1127
- // fun `startup queue should replay with alias enrichment closure`() {
1128
- // val expected = "bar"
1129
- //
1130
- // analytics.add(afterPlugin)
1131
- // analytics.alias(expected) {
1132
- // it?.anonymousId = "test"
1133
- // it
1134
- // }
1135
- //
1136
- // // now we have tracked event, i.e. event added to startup queue
1137
- // // release the semaphore put on http client, so we startup queue will replay the events
1138
- // httpSemaphore.release()
1139
- // // now we need to wait for events being fully replayed before making assertions
1140
- // assertSemaphore.acquire()
1141
- //
1142
- // assertTrue(actual.isCaptured)
1143
- // actual.captured.let {
1144
- // assertTrue(it is AliasEvent)
1145
- // val e = it as AliasEvent
1146
- // assertEquals(expected, e.userId)
1147
- // assertEquals("test", e.anonymousId)
1148
- // }
1149
- // }
1125
+
1126
+ @Test
1127
+ fun `startup queue should replay with alias enrichment closure` () {
1128
+ val expected = " bar"
1129
+
1130
+ analytics.add(afterPlugin)
1131
+ analytics.alias(expected) {
1132
+ it?.anonymousId = " test"
1133
+ it
1134
+ }
1135
+
1136
+ // now we have tracked event, i.e. event added to startup queue
1137
+ // release the semaphore put on http client, so we startup queue will replay the events
1138
+ httpSemaphore.release()
1139
+ // now we need to wait for events being fully replayed before making assertions
1140
+ assertSemaphore.acquire()
1141
+
1142
+ assertTrue(actual.isCaptured)
1143
+ actual.captured.let {
1144
+ assertTrue(it is AliasEvent )
1145
+ val e = it as AliasEvent
1146
+ assertEquals(expected, e.userId)
1147
+ assertEquals(" test" , e.anonymousId)
1148
+ }
1149
+ }
1150
1150
}
0 commit comments