Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test was only flaky when running it using testcontainers. The problem lies in the RecordStreamSourceWrapper. In this class we would get all the records from the engine (RecordStreamSource). These records would be mapped to json and put into a list. The problem for this test was that we just override all records everytime we request them from the engine. With this change we keep track of the latest event we've mapped. When we get a new request we will fetch all the records of the engine. We will filter those so we only have the records that we haven't stored in our list yet. These will be mapped and added. When the mapping is done we return a copy of the list. We need to make sure no more records are added, because the calling method will iterate over this list.
- Loading branch information