lytics / ios-sdk

MIT License
0 stars 0 forks source link

`dispatch` function does not appear to flush the queue as expected #59

Closed markhayden closed 1 year ago

markhayden commented 1 year ago

In testing the dispatch function didn't appear to work as expected. What I would expect it to do is flush whatever is in the queue upon firing that request.

So for instance if I have a queue limit of 10 that gets flushed every minute based on the config. And then I add three track events followed by a dispatch, I'd expect to see the subsequent API calls fire near immediately. Instead what I observed was the queue would fall back to the predefined limits and either flush at 10 events in queue or after the minute expired.

mgacy commented 1 year ago

I was unable to reproduce this issue and have since added additional tests. Operation should be fully covered by LyticsTests.testDispatch(), EventPipelineTests.testDispatch(), EventQueueTests.testManualFlush(), and EventQueueTests.testLogErrors(). It could fail to send the events if there was an error when trying to create a Request object from the enqueued events, but that would be logged.

kgruenef commented 1 year ago

@markhayden based on this update https://github.com/lytics/ios-sdk/issues/59#issuecomment-1412351692 can we close this issue or was there something else you want investigated?

RaeEversmann commented 1 year ago

Tested in a simulator, and it appears to be working. Closing issue