Skip to content

Commit

Permalink
ci: integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 4, 2024
1 parent db51e2c commit 35b1676
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class EventRecorder: AnalyticsEventRecording {
let dbUtil: ClickstreamDBProtocol
private(set) var queue: OperationQueue
private(set) var bundleSequenceId: Int
var allEventJson: String = ""

init(clickstream: ClickstreamContext) throws {
self.clickstream = clickstream
Expand All @@ -51,6 +52,8 @@ class EventRecorder: AnalyticsEventRecording {
if clickstream.configuration.isLogEvents {
setLogLevel(logLevel: LogLevel.debug)
log.debug("Saved event: \(event.eventType)\n\(eventObject.toPrettierJsonString())")
allEventJson.append("Saved event \(event.eventType):\(eventObject.toJsonString())\n")
UIPasteboard.general.string = allEventJson
}
while try dbUtil.getTotalSize() > Constants.maxDbSize {
let events = try dbUtil.getEventsWith(limit: 5)
Expand Down Expand Up @@ -111,6 +114,8 @@ class EventRecorder: AnalyticsEventRecording {
}
try dbUtil.deleteBatchEvents(lastEventId: batchEvent.lastEventId)
log.debug("Send \(batchEvent.eventCount) events")
allEventJson.append("Send \(batchEvent.eventCount) events\n")
UIPasteboard.general.string = allEventJson
totalEventSend += batchEvent.eventCount
submissions += 1
} while submissions < Constants.maxSubmissionsAllowed
Expand Down

0 comments on commit 35b1676

Please sign in to comment.